diff options
Diffstat (limited to 'testsuite/tests/ghci/scripts')
-rw-r--r-- | testsuite/tests/ghci/scripts/T8639.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8639.script | 19 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8639.stderr | 4 | ||||
-rwxr-xr-x | testsuite/tests/ghci/scripts/all.T | 1 |
4 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T8639.hs b/testsuite/tests/ghci/scripts/T8639.hs new file mode 100644 index 0000000000..d3d4c91534 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T8639.hs @@ -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 index 0000000000..a7db1727a5 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T8639.script @@ -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 index 0000000000..ca52a89a57 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T8639.stderr @@ -0,0 +1,4 @@ + +<interactive>:1:1: + Not in scope: ‛H.bit’ + Perhaps you meant ‛Q.bit’ (imported from T8639) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 966ea90c0d..c1c50cd254 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -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']) |