[commit: ghc] ghc-8.0: testsuite: Add test for #11827 (d56bb43)

git at git.haskell.org git at git.haskell.org
Sat Apr 16 17:29:25 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/d56bb43ea7395d18d253e0b2f31586e41647d0d9/ghc

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

commit d56bb43ea7395d18d253e0b2f31586e41647d0d9
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Apr 15 11:41:24 2016 +0200

    testsuite: Add test for #11827
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2109
    
    GHC Trac Issues: #11827
    
    (cherry picked from commit cb0d29b21ccadde681f80f9e414f78ab42a203c7)


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

d56bb43ea7395d18d253e0b2f31586e41647d0d9
 testsuite/tests/ghci/T11827/A.hs          | 6 ++++++
 testsuite/tests/ghci/T11827/A.hs-boot     | 5 +++++
 testsuite/tests/ghci/T11827/B.hs          | 8 ++++++++
 testsuite/tests/ghci/T11827/T11827.script | 1 +
 testsuite/tests/ghci/T11827/T11827.stderr | 2 ++
 testsuite/tests/ghci/T11827/all.T         | 4 ++++
 6 files changed, 26 insertions(+)

diff --git a/testsuite/tests/ghci/T11827/A.hs b/testsuite/tests/ghci/T11827/A.hs
new file mode 100644
index 0000000..04e4a65
--- /dev/null
+++ b/testsuite/tests/ghci/T11827/A.hs
@@ -0,0 +1,6 @@
+module A where
+
+data A = A
+
+f :: A -> Bool
+f C = False
diff --git a/testsuite/tests/ghci/T11827/A.hs-boot b/testsuite/tests/ghci/T11827/A.hs-boot
new file mode 100644
index 0000000..a863a13
--- /dev/null
+++ b/testsuite/tests/ghci/T11827/A.hs-boot
@@ -0,0 +1,5 @@
+module A where
+
+data A
+
+f :: A -> Bool
diff --git a/testsuite/tests/ghci/T11827/B.hs b/testsuite/tests/ghci/T11827/B.hs
new file mode 100644
index 0000000..0beccbd
--- /dev/null
+++ b/testsuite/tests/ghci/T11827/B.hs
@@ -0,0 +1,8 @@
+module B where
+
+import {-# SOURCE #-} A
+
+data B = B A
+
+g :: B -> Bool
+g (B a) = f a
diff --git a/testsuite/tests/ghci/T11827/T11827.script b/testsuite/tests/ghci/T11827/T11827.script
new file mode 100644
index 0000000..fa13992
--- /dev/null
+++ b/testsuite/tests/ghci/T11827/T11827.script
@@ -0,0 +1 @@
+:load B.hs
\ No newline at end of file
diff --git a/testsuite/tests/ghci/T11827/T11827.stderr b/testsuite/tests/ghci/T11827/T11827.stderr
new file mode 100644
index 0000000..84f3cea
--- /dev/null
+++ b/testsuite/tests/ghci/T11827/T11827.stderr
@@ -0,0 +1,2 @@
+
+A.hs:6:3: error: Not in scope: data constructor ‘C’
diff --git a/testsuite/tests/ghci/T11827/all.T b/testsuite/tests/ghci/T11827/all.T
new file mode 100644
index 0000000..d31f6af
--- /dev/null
+++ b/testsuite/tests/ghci/T11827/all.T
@@ -0,0 +1,4 @@
+test('T11827',
+     [extra_clean(['A.hi', 'A.hi-boot', 'A.o', 'B.hi', 'B.o']),
+      exit_code(1), expect_broken(11827)],
+     ghci_script, ['T11827.script'])



More information about the ghc-commits mailing list