[commit: ghc] wip/T11970: Add test (5b21c23)

git at git.haskell.org git at git.haskell.org
Fri Jun 17 20:11:10 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T11970
Link       : http://ghc.haskell.org/trac/ghc/changeset/5b21c23bd768b06e3ff6e1e58a865d9d34eea3f2/ghc

>---------------------------------------------------------------

commit 5b21c23bd768b06e3ff6e1e58a865d9d34eea3f2
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Sat Jun 11 22:11:44 2016 +0100

    Add test


>---------------------------------------------------------------

5b21c23bd768b06e3ff6e1e58a865d9d34eea3f2
 testsuite/tests/module/T11970A.hs     | 5 +++++
 testsuite/tests/module/T11970A.stderr | 5 +++++
 testsuite/tests/module/T11970A1.hs    | 3 +++
 testsuite/tests/module/all.T          | 1 +
 4 files changed, 14 insertions(+)

diff --git a/testsuite/tests/module/T11970A.hs b/testsuite/tests/module/T11970A.hs
new file mode 100644
index 0000000..b20aa80
--- /dev/null
+++ b/testsuite/tests/module/T11970A.hs
@@ -0,0 +1,5 @@
+module T11970A ( Fail(a) ) where
+
+import T11970A1 ( Fail(a, b) )
+
+
diff --git a/testsuite/tests/module/T11970A.stderr b/testsuite/tests/module/T11970A.stderr
new file mode 100644
index 0000000..6b478a7
--- /dev/null
+++ b/testsuite/tests/module/T11970A.stderr
@@ -0,0 +1,5 @@
+[1 of 2] Compiling T11970A1         ( T11970A1.hs, T11970A1.o )
+[2 of 2] Compiling T11970A          ( T11970A.hs, T11970A.o )
+
+T11970A.hs:3:1: warning: [-Wunused-imports (in -Wextra)]
+    The import of ‘Fail(b)’ from module ‘T11970A1’ is redundant
diff --git a/testsuite/tests/module/T11970A1.hs b/testsuite/tests/module/T11970A1.hs
new file mode 100644
index 0000000..6c9c6d2
--- /dev/null
+++ b/testsuite/tests/module/T11970A1.hs
@@ -0,0 +1,3 @@
+module T11970A1 where
+
+data Fail = Fail { a :: Int, b :: Int }
diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T
index 1158b29..10fc4d8 100644
--- a/testsuite/tests/module/all.T
+++ b/testsuite/tests/module/all.T
@@ -351,4 +351,5 @@ test('T11432', normal, compile_fail, [''])
 test('T11432a', normal, compile_fail, [''])
 test('T12026', normal, compile_fail, [''])
 test('T11970', normal, compile_fail, [''])
+test('T11970A', [], multimod_compile, ['T11970A','-Wunused-imports'])
 test('MultiExport', normal, compile, [''])



More information about the ghc-commits mailing list