diff options
-rw-r--r-- | testsuite/tests/ghci/prog010/Makefile | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/ghci.prog010.script | 7 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/ghci.prog010.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/ghci.prog010.stdout | 2 |
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 |