Add test for #10600 (exhaustiveness check with --make and -fno-code)
authorReid Barton <rwbarton@gmail.com>
Thu, 6 Aug 2015 18:12:38 +0000 (14:12 -0400)
committerReid Barton <rwbarton@gmail.com>
Thu, 6 Aug 2015 18:58:08 +0000 (14:58 -0400)
testsuite/tests/driver/T8101b.hs [new file with mode: 0644]
testsuite/tests/driver/T8101b.stderr [new file with mode: 0644]
testsuite/tests/driver/all.T

diff --git a/testsuite/tests/driver/T8101b.hs b/testsuite/tests/driver/T8101b.hs
new file mode 100644 (file)
index 0000000..d7bcc1b
--- /dev/null
@@ -0,0 +1,8 @@
+
+module A where
+
+data ABC = A | B | C
+
+abc :: ABC -> Int
+abc x = case x of
+    A -> 1
diff --git a/testsuite/tests/driver/T8101b.stderr b/testsuite/tests/driver/T8101b.stderr
new file mode 100644 (file)
index 0000000..555b036
--- /dev/null
@@ -0,0 +1,7 @@
+
+T8101b.hs:7:9: Warning:
+    Pattern match(es) are non-exhaustive
+    In a case alternative:
+        Patterns not matched:
+            B
+            C
index 65c3776..b79f166 100644 (file)
@@ -398,6 +398,8 @@ test('T8959a',
 test('T703', normal, run_command, ['$MAKE -s --no-print-directory T703'])
 test('T2182', normal, run_command, ['$MAKE -s --no-print-directory T2182'])
 test('T8101', normal, compile, ['-Wall -fno-code'])
+test('T8101b', expect_broken(10600), multimod_compile,
+     ['T8101b', '-Wall -fno-code'])
 
 def build_T9050(name, way):
      return simple_build(name + '.cmm', way, '-outputdir=. ', 0, '', 0, 0, 0)