summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/prog010
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-06-13 14:48:24 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2016-06-14 17:23:36 +0200
commita2deee068caa5b774adc62db4077e22fa0173ddc (patch)
treeb0e5b474a802791dd34a8b17e43c6366c11b114d /testsuite/tests/ghci/prog010
parent8dfd4aeb1cd0929d4733df4bd7baf3f02e44236c (diff)
downloadhaskell-a2deee068caa5b774adc62db4077e22fa0173ddc.tar.gz
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.
Diffstat (limited to 'testsuite/tests/ghci/prog010')
-rw-r--r--testsuite/tests/ghci/prog010/Makefile3
-rw-r--r--testsuite/tests/ghci/prog010/all.T4
-rw-r--r--testsuite/tests/ghci/prog010/ghci.prog010.script7
-rw-r--r--testsuite/tests/ghci/prog010/ghci.prog010.stderr4
-rw-r--r--testsuite/tests/ghci/prog010/ghci.prog010.stdout2
5 files changed, 15 insertions, 5 deletions
diff --git a/testsuite/tests/ghci/prog010/Makefile b/testsuite/tests/ghci/prog010/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/ghci/prog010/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/ghci/prog010/all.T b/testsuite/tests/ghci/prog010/all.T
new file mode 100644
index 0000000000..d30de29400
--- /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 563e471a59..f86829b3cf 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 c7cbb1173f..75c4fb4121 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 ccb6dcd78f..0cc49e23d5 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