Test Trac #8639 (just the GHCi version)
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 31 Dec 2013 17:07:31 +0000 (17:07 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 2 Jan 2014 15:18:58 +0000 (15:18 +0000)
testsuite/tests/ghci/scripts/T8639.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/T8639.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T8639.stderr [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/T8639.hs b/testsuite/tests/ghci/scripts/T8639.hs
new file mode 100644 (file)
index 0000000..d3d4c91
--- /dev/null
@@ -0,0 +1,4 @@
+module T8639 where
+
+it = True
+bit = 'c'
diff --git a/testsuite/tests/ghci/scripts/T8639.script b/testsuite/tests/ghci/scripts/T8639.script
new file mode 100644 (file)
index 0000000..a7db172
--- /dev/null
@@ -0,0 +1,19 @@
+:l T8639.hs
+:t it
+bit
+:t it
+   -- Gets the last thing evaluated (T8639.bit)
+:t T8639.it
+   -- Gets 'it' from T8639
+
+:m -T8639
+import T8639 as Q
+
+:t bit
+:t Q.bit
+:t H.bit
+   -- Should say "out of scope"
+:t it
+   -- Gets the last thing evaluated (T8639.bit)
+:t Q.it
+   -- Gets 'it' from T8639
diff --git a/testsuite/tests/ghci/scripts/T8639.stderr b/testsuite/tests/ghci/scripts/T8639.stderr
new file mode 100644 (file)
index 0000000..ca52a89
--- /dev/null
@@ -0,0 +1,4 @@
+
+<interactive>:1:1:
+    Not in scope: ‛H.bit’
+    Perhaps you meant ‛Q.bit’ (imported from T8639)
index 966ea90..c1c50cd 100755 (executable)
@@ -160,3 +160,4 @@ test('T8383', normal, ghci_script, ['T8383.script'])
 test('T8469', normal, ghci_script, ['T8469.script'])
 test('T8485', normal, ghci_script, ['T8485.script'])
 test('T8535', normal, ghci_script, ['T8535.script'])
+test('T8639', normal, ghci_script, ['T8639.script'])