summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-e/should_fail
diff options
context:
space:
mode:
authorReid Barton <rwbarton@gmail.com>2014-12-23 15:22:01 -0500
committerReid Barton <rwbarton@gmail.com>2014-12-23 15:31:41 -0500
commit878910e1c4520732ab9d8372c1c81f00d484e48f (patch)
tree7503de9cd2ea6dd2777670df3429b51b2cab9c58 /testsuite/tests/ghc-e/should_fail
parent7a2c9dde24b72fe53216881867d5543e5a6f756c (diff)
downloadhaskell-878910e1c4520732ab9d8372c1c81f00d484e48f.tar.gz
Make ghc -e not exit on valid import commands (#9905)
Summary: Some Trues and Falses were mixed up due to Bool being used in different senses in different parts of GHCi. Test Plan: harbormaster; validate Reviewers: austin Reviewed By: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D581 GHC Trac Issues: #9905 Conflicts: ghc/InteractiveUI.hs
Diffstat (limited to 'testsuite/tests/ghc-e/should_fail')
-rw-r--r--testsuite/tests/ghc-e/should_fail/Makefile9
-rw-r--r--testsuite/tests/ghc-e/should_fail/all.T12
2 files changed, 20 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-e/should_fail/Makefile b/testsuite/tests/ghc-e/should_fail/Makefile
index 5b0d753817..7a02f7bea3 100644
--- a/testsuite/tests/ghc-e/should_fail/Makefile
+++ b/testsuite/tests/ghc-e/should_fail/Makefile
@@ -4,3 +4,12 @@ include $(TOP)/mk/test.mk
T7962:
'$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "return ("
+
+T9905fail1:
+ '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import This.Module.Does.Not.Exist"
+
+T9905fail2:
+ '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import Data.List (bogusIdentifier)"
+
+T9905fail3:
+ '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import Prelude (+)" # syntax error
diff --git a/testsuite/tests/ghc-e/should_fail/all.T b/testsuite/tests/ghc-e/should_fail/all.T
index 4c5ac5cebd..07dc614eab 100644
--- a/testsuite/tests/ghc-e/should_fail/all.T
+++ b/testsuite/tests/ghc-e/should_fail/all.T
@@ -1,3 +1,13 @@
setTestOpts(when(compiler_profiled(), skip))
-test('T7962', [exit_code(2), req_interp, ignore_output], run_command, ['$MAKE --no-print-directory -s T7962'])
+test('T7962', [exit_code(2), req_interp, ignore_output], run_command,
+ ['$MAKE --no-print-directory -s T7962'])
+
+test('T9905fail1', [exit_code(2), req_interp, ignore_output], run_command,
+ ['$MAKE --no-print-directory -s T9905fail1'])
+
+test('T9905fail2', [exit_code(2), req_interp, ignore_output], run_command,
+ ['$MAKE --no-print-directory -s T9905fail2'])
+
+test('T9905fail3', [exit_code(2), req_interp, ignore_output], run_command,
+ ['$MAKE --no-print-directory -s T9905fail3'])