summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/prog011
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghci/prog011')
-rw-r--r--testsuite/tests/ghci/prog011/Makefile3
-rw-r--r--testsuite/tests/ghci/prog011/prog011.T2
-rw-r--r--testsuite/tests/ghci/prog011/prog011.hx16
-rw-r--r--testsuite/tests/ghci/prog011/prog011.script3
-rw-r--r--testsuite/tests/ghci/prog011/prog011.stderr2
-rw-r--r--testsuite/tests/ghci/prog011/prog011.stdout3
6 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog011/Makefile b/testsuite/tests/ghci/prog011/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/ghci/prog011/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/ghci/prog011/prog011.T b/testsuite/tests/ghci/prog011/prog011.T
new file mode 100644
index 0000000000..c14d457b10
--- /dev/null
+++ b/testsuite/tests/ghci/prog011/prog011.T
@@ -0,0 +1,2 @@
+test('prog011', reqlib('mtl'), ghci_script, ['prog011.script'])
+
diff --git a/testsuite/tests/ghci/prog011/prog011.hx b/testsuite/tests/ghci/prog011/prog011.hx
new file mode 100644
index 0000000000..a9ae3aa347
--- /dev/null
+++ b/testsuite/tests/ghci/prog011/prog011.hx
@@ -0,0 +1,16 @@
+:set +m
+:m +Control.Monad.State
+flip evalStateT 10 $ do
+ i <- get
+ lift $ print i
+
+a <- return "Hello"
+flip evalStateT 11 $ do
+ i <- get
+ lift $ print i
+ lift $ print a
+
+:unset +m
+flip evalStateT 12 $ do
+
+print a
diff --git a/testsuite/tests/ghci/prog011/prog011.script b/testsuite/tests/ghci/prog011/prog011.script
new file mode 100644
index 0000000000..011093f314
--- /dev/null
+++ b/testsuite/tests/ghci/prog011/prog011.script
@@ -0,0 +1,3 @@
+-- test for #1363
+
+:script prog011.hx
diff --git a/testsuite/tests/ghci/prog011/prog011.stderr b/testsuite/tests/ghci/prog011/prog011.stderr
new file mode 100644
index 0000000000..6ee1facfdc
--- /dev/null
+++ b/testsuite/tests/ghci/prog011/prog011.stderr
@@ -0,0 +1,2 @@
+
+prog011.hx:14:22: Empty 'do' block
diff --git a/testsuite/tests/ghci/prog011/prog011.stdout b/testsuite/tests/ghci/prog011/prog011.stdout
new file mode 100644
index 0000000000..5b3671f1f3
--- /dev/null
+++ b/testsuite/tests/ghci/prog011/prog011.stdout
@@ -0,0 +1,3 @@
+10
+11
+"Hello"