diff options
author | Reid Barton <rwbarton@gmail.com> | 2014-12-23 15:22:01 -0500 |
---|---|---|
committer | Reid Barton <rwbarton@gmail.com> | 2014-12-23 15:31:41 -0500 |
commit | 878910e1c4520732ab9d8372c1c81f00d484e48f (patch) | |
tree | 7503de9cd2ea6dd2777670df3429b51b2cab9c58 /testsuite/tests/ghc-e | |
parent | 7a2c9dde24b72fe53216881867d5543e5a6f756c (diff) | |
download | haskell-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')
-rw-r--r-- | testsuite/tests/ghc-e/should_fail/Makefile | 9 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_fail/all.T | 12 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_run/Makefile | 6 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_run/T9905.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_run/T9905b.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_run/all.T | 2 |
6 files changed, 30 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']) diff --git a/testsuite/tests/ghc-e/should_run/Makefile b/testsuite/tests/ghc-e/should_run/Makefile index 5ed1ec2e6c..aa7041bc13 100644 --- a/testsuite/tests/ghc-e/should_run/Makefile +++ b/testsuite/tests/ghc-e/should_run/Makefile @@ -32,3 +32,9 @@ T7299: T9086: '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e ":main" T9086.hs + +T9905: + '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import Data.List" -e "sort [2,1]" + +T9905b: + '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import qualified Data.List as L" -e "L.sort [2,1]" diff --git a/testsuite/tests/ghc-e/should_run/T9905.stdout b/testsuite/tests/ghc-e/should_run/T9905.stdout new file mode 100644 index 0000000000..6ed63af507 --- /dev/null +++ b/testsuite/tests/ghc-e/should_run/T9905.stdout @@ -0,0 +1 @@ +[1,2] diff --git a/testsuite/tests/ghc-e/should_run/T9905b.stdout b/testsuite/tests/ghc-e/should_run/T9905b.stdout new file mode 100644 index 0000000000..6ed63af507 --- /dev/null +++ b/testsuite/tests/ghc-e/should_run/T9905b.stdout @@ -0,0 +1 @@ +[1,2] diff --git a/testsuite/tests/ghc-e/should_run/all.T b/testsuite/tests/ghc-e/should_run/all.T index 9f6491819d..329ceea7f7 100644 --- a/testsuite/tests/ghc-e/should_run/all.T +++ b/testsuite/tests/ghc-e/should_run/all.T @@ -15,3 +15,5 @@ test('T2636', req_interp, run_command, ['$MAKE --no-print-directory -s T2636']) test('T3890', req_interp, run_command, ['$MAKE --no-print-directory -s T3890']) test('T7299', req_interp, run_command, ['$MAKE --no-print-directory -s T7299']) test('T9086', req_interp, run_command, ['$MAKE --no-print-directory -s T9086']) +test('T9905', req_interp, run_command, ['$MAKE --no-print-directory -s T9905']) +test('T9905b', req_interp, run_command, ['$MAKE --no-print-directory -s T9905b']) |