summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/should_run/T9914.script9
-rw-r--r--testsuite/tests/ghci/should_run/T9914.stdout5
-rw-r--r--testsuite/tests/ghci/should_run/all.T1
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/should_run/T9914.script b/testsuite/tests/ghci/should_run/T9914.script
new file mode 100644
index 0000000000..d40f46f667
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T9914.script
@@ -0,0 +1,9 @@
+let x = 1
+x
+ let x = 2 -- Note leading whitespace
+x
+2
+data T1 = MkT1
+:i T1
+ data T2 = MkT2 -- Note leading whitespace
+:i T2
diff --git a/testsuite/tests/ghci/should_run/T9914.stdout b/testsuite/tests/ghci/should_run/T9914.stdout
new file mode 100644
index 0000000000..3dd5aff3f3
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T9914.stdout
@@ -0,0 +1,5 @@
+1
+2
+2
+data T1 = MkT1 -- Defined at <interactive>:7:1
+data T2 = MkT2 -- Defined at <interactive>:9:2
diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T
index effad6a725..b28e4a3893 100644
--- a/testsuite/tests/ghci/should_run/all.T
+++ b/testsuite/tests/ghci/should_run/all.T
@@ -20,4 +20,5 @@ test('T3171',
test('ghcirun004', just_ghci, compile_and_run, [''])
test('T8377', just_ghci, compile_and_run, [''])
+test('T9914', just_ghci, ghci_script, ['T9914.script'])
test('T9915', just_ghci, ghci_script, ['T9915.script'])