[commit: ghc] master: Testsuite: enable ghci.prog010 (#2542) (a2deee0)

git at git.haskell.org git at git.haskell.org
Tue Jun 14 15:20:21 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a2deee068caa5b774adc62db4077e22fa0173ddc/ghc

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

commit a2deee068caa5b774adc62db4077e22fa0173ddc
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Mon Jun 13 14:48:24 2016 +0200

    Testsuite: enable ghci.prog010 (#2542)
    
    This test didn't have a `.T` file, so the testsuite driver never ran it.
    Luckily the features it tested for didn't break in the past 8 years.


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

a2deee068caa5b774adc62db4077e22fa0173ddc
 .../tests/{annotations/should_compile => ghci/prog010}/Makefile    | 0
 testsuite/tests/ghci/prog010/all.T                                 | 4 ++++
 testsuite/tests/ghci/prog010/ghci.prog010.script                   | 7 +++++--
 testsuite/tests/ghci/prog010/ghci.prog010.stderr                   | 4 +++-
 testsuite/tests/ghci/prog010/ghci.prog010.stdout                   | 2 --
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/testsuite/tests/annotations/should_compile/Makefile b/testsuite/tests/ghci/prog010/Makefile
similarity index 100%
copy from testsuite/tests/annotations/should_compile/Makefile
copy to testsuite/tests/ghci/prog010/Makefile
diff --git a/testsuite/tests/ghci/prog010/all.T b/testsuite/tests/ghci/prog010/all.T
new file mode 100644
index 0000000..d30de29
--- /dev/null
+++ b/testsuite/tests/ghci/prog010/all.T
@@ -0,0 +1,4 @@
+test('ghci.prog010',
+     [cmd_prefix('ghciWayFlags=' + config.ghci_way_flags),
+      extra_files(['../shell.hs', 'A.hs', 'B.hs'])],
+     ghci_script, ['ghci.prog010.script'])
diff --git a/testsuite/tests/ghci/prog010/ghci.prog010.script b/testsuite/tests/ghci/prog010/ghci.prog010.script
index 563e471..f86829b 100644
--- a/testsuite/tests/ghci/prog010/ghci.prog010.script
+++ b/testsuite/tests/ghci/prog010/ghci.prog010.script
@@ -10,7 +10,7 @@
 :type f
 :type g
 
-:shell $HC $HC_OPTS -fforce-recomp -c A.hs
+:shell "$HC" $HC_OPTS $ghciWayFlags -fforce-recomp -c A.hs
 
 :load A
 -- we can now see only f
@@ -24,9 +24,12 @@
 :type f
 :type g
 
-:shell $HC $HC_OPTS -fforce-recomp -c B.hs
+:shell "$HC" $HC_OPTS $ghciWayFlags -fforce-recomp -c B.hs
 :load B
+
+-- this will tell us we need to load A interpreted
 :module *A
+
 :add *A
 :module *A
 :type f
diff --git a/testsuite/tests/ghci/prog010/ghci.prog010.stderr b/testsuite/tests/ghci/prog010/ghci.prog010.stderr
index c7cbb11..75c4fb4 100644
--- a/testsuite/tests/ghci/prog010/ghci.prog010.stderr
+++ b/testsuite/tests/ghci/prog010/ghci.prog010.stderr
@@ -1,2 +1,4 @@
 
-<interactive>:1:0: Not in scope: `g'
+<interactive>:1:1: error: Variable not in scope: g
+module 'A' is not interpreted; try ':add *A' first
+module 'A' is not interpreted; try ':add *A' first
diff --git a/testsuite/tests/ghci/prog010/ghci.prog010.stdout b/testsuite/tests/ghci/prog010/ghci.prog010.stdout
index ccb6dcd..0cc49e2 100644
--- a/testsuite/tests/ghci/prog010/ghci.prog010.stdout
+++ b/testsuite/tests/ghci/prog010/ghci.prog010.stdout
@@ -1,9 +1,7 @@
 f :: t -> [t]
 g :: a -> Maybe a
 f :: t -> [t]
-module 'A' is not interpreted; try ':add *A' first
 f :: t -> [t]
 g :: a -> Maybe a
-module 'A' is not interpreted; try ':add *A' first
 f :: t -> [t]
 g :: a -> Maybe a



More information about the ghc-commits mailing list