diff options
Diffstat (limited to 'testsuite/tests/ghci/prog009')
-rw-r--r-- | testsuite/tests/ghci/prog009/A1.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/A2.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/A3.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/B.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/Makefile | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/ghci.prog009.T | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/ghci.prog009.script | 36 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/ghci.prog009.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog009/ghci.prog009.stdout | 8 |
9 files changed, 68 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog009/A1.hs b/testsuite/tests/ghci/prog009/A1.hs new file mode 100644 index 0000000000..41644a1c54 --- /dev/null +++ b/testsuite/tests/ghci/prog009/A1.hs @@ -0,0 +1,3 @@ +module A where + +import B diff --git a/testsuite/tests/ghci/prog009/A2.hs b/testsuite/tests/ghci/prog009/A2.hs new file mode 100644 index 0000000000..d843c00b78 --- /dev/null +++ b/testsuite/tests/ghci/prog009/A2.hs @@ -0,0 +1 @@ +module A where diff --git a/testsuite/tests/ghci/prog009/A3.hs b/testsuite/tests/ghci/prog009/A3.hs new file mode 100644 index 0000000000..4a61af00da --- /dev/null +++ b/testsuite/tests/ghci/prog009/A3.hs @@ -0,0 +1,2 @@ +module A where where + diff --git a/testsuite/tests/ghci/prog009/B.hs b/testsuite/tests/ghci/prog009/B.hs new file mode 100644 index 0000000000..14580d43b3 --- /dev/null +++ b/testsuite/tests/ghci/prog009/B.hs @@ -0,0 +1,3 @@ +module B where + +yan = "tan" diff --git a/testsuite/tests/ghci/prog009/Makefile b/testsuite/tests/ghci/prog009/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghci/prog009/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.T b/testsuite/tests/ghci/prog009/ghci.prog009.T new file mode 100644 index 0000000000..f8b063407d --- /dev/null +++ b/testsuite/tests/ghci/prog009/ghci.prog009.T @@ -0,0 +1,4 @@ +test('ghci.prog009', + extra_clean(['A.hs']), + ghci_script, + ['ghci.prog009.script']) diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.script b/testsuite/tests/ghci/prog009/ghci.prog009.script new file mode 100644 index 0000000000..6005727d44 --- /dev/null +++ b/testsuite/tests/ghci/prog009/ghci.prog009.script @@ -0,0 +1,36 @@ +:! cp A1.hs A.hs +import Data.List +:load A +-- Data.List should still be in scope: +:t nub +:module +B +yan +:! sleep 1 +:! cp A3.hs A.hs +:reload +-- error, context drops to Prelude,Data.List +-- Data.List should still be in scope: +:t nub +:! sleep 1 +:! cp A1.hs A.hs +:reload +-- ok again, B should be back in the context +yan +-- Data.List should still be in scope: +:t nub +:! sleep 1 +:! cp A2.hs A.hs +:reload +:show modules +yan -- error + +-- Now testing for bug #2049 +:! cp A3.hs A.hs +:load A.hs +-- should fail +-- Data.List should still be in scope: +:type nub +:! sleep 1 +:! cp A1.hs A.hs +:reload +yan diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.stderr b/testsuite/tests/ghci/prog009/ghci.prog009.stderr new file mode 100644 index 0000000000..484a1b9f27 --- /dev/null +++ b/testsuite/tests/ghci/prog009/ghci.prog009.stderr @@ -0,0 +1,8 @@ + +A.hs:1:16: parse error on input `where' + +<interactive>:1:1: + Not in scope: `yan' + Perhaps you meant `tan' (imported from Prelude) + +A.hs:1:16: parse error on input `where' diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.stdout b/testsuite/tests/ghci/prog009/ghci.prog009.stdout new file mode 100644 index 0000000000..74d4c49e88 --- /dev/null +++ b/testsuite/tests/ghci/prog009/ghci.prog009.stdout @@ -0,0 +1,8 @@ +nub :: Eq a => [a] -> [a]
+"tan"
+nub :: Eq a => [a] -> [a]
+"tan"
+nub :: Eq a => [a] -> [a]
+A ( A.hs, interpreted )
+nub :: Eq a => [a] -> [a]
+"tan"
|