Add a test for #1133
authorIan Lynagh <ian@well-typed.com>
Tue, 22 Jan 2013 18:58:50 +0000 (18:58 +0000)
committerIan Lynagh <ian@well-typed.com>
Tue, 22 Jan 2013 18:58:50 +0000 (18:58 +0000)
testsuite/tests/deriving/should_compile/Makefile
testsuite/tests/deriving/should_compile/T1133.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/T1133.hs-boot [new file with mode: 0644]
testsuite/tests/deriving/should_compile/all.T

index 9101fbd..666f7a7 100644 (file)
@@ -1,3 +1,9 @@
 TOP=../../..
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/test.mk
+
+.PHONY: T1133
+T1133:
+       $(TEST_HC) $(TEST_HC_OPTS) -c T1133.hs-boot
+       $(TEST_HC) $(TEST_HC_OPTS) -c T1133.hs
+
diff --git a/testsuite/tests/deriving/should_compile/T1133.hs b/testsuite/tests/deriving/should_compile/T1133.hs
new file mode 100644 (file)
index 0000000..5d471d1
--- /dev/null
@@ -0,0 +1,8 @@
+
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+
+module T1133 where
+
+import {-# SOURCE #-} T1133
+
+newtype X = X Int deriving Enum
diff --git a/testsuite/tests/deriving/should_compile/T1133.hs-boot b/testsuite/tests/deriving/should_compile/T1133.hs-boot
new file mode 100644 (file)
index 0000000..520a2c0
--- /dev/null
@@ -0,0 +1,4 @@
+
+module T1133 where
+
+newtype X = X Int
index 11a10b6..6fbe383 100644 (file)
@@ -31,3 +31,7 @@ test('drv-functor1', normal, compile, [''])
 test('drv-functor2', normal, compile, [''])
 test('drv-foldable-traversable1', normal, compile, [''])
 test('T6031', extra_clean(['T6031a.o', 'T6031a.hi']), multimod_compile, ['T6031', '-v0'])
+test('T1133',
+     extra_clean(['T1133.o-boot', 'T1133.hi-boot']),
+     run_command,
+     ['$MAKE --no-print-directory -s T1133'])