diff options
author | Reid Barton <rwbarton@gmail.com> | 2016-01-22 09:59:20 -0500 |
---|---|---|
committer | Reid Barton <rwbarton@gmail.com> | 2016-01-22 09:59:23 -0500 |
commit | 9048c3dfee1c7c9171114c349714095b3abcc47a (patch) | |
tree | 87b9b147729e3e03680418b49c1abfae4c8ed885 /testsuite | |
parent | 2df422161bccf7c0fad97e468085ebab1a17e19e (diff) | |
download | haskell-9048c3dfee1c7c9171114c349714095b3abcc47a.tar.gz |
Don't print "Loaded GHCi configuration" message in ghc -e (#11478)
Summary:
Also don't print it if the user specifically requested
non-verbose output with -v0.
Since this means there is no longer any test that checks
for the message, add such a test.
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1817
GHC Trac Issues: #11478
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghc-e/should_run/Makefile | 4 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_run/T11478.script | 0 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_run/T11478.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/ghc-e/should_run/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/Makefile | 7 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T10408.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T11389.script | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T11389.stdout | 1 | ||||
-rwxr-xr-x | testsuite/tests/ghci/scripts/all.T | 2 |
9 files changed, 17 insertions, 2 deletions
diff --git a/testsuite/tests/ghc-e/should_run/Makefile b/testsuite/tests/ghc-e/should_run/Makefile index 54ce8a31cc..c98b98ada7 100644 --- a/testsuite/tests/ghc-e/should_run/Makefile +++ b/testsuite/tests/ghc-e/should_run/Makefile @@ -41,3 +41,7 @@ T9905: T9905b: '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -e "import qualified Data.List as L" -e "L.sort [2,1]" + +# Ensure that ghc -e does not output extra messages about GHCi configuration files +T11478: + '$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -ghci-script T11478.script -e 3 diff --git a/testsuite/tests/ghc-e/should_run/T11478.script b/testsuite/tests/ghc-e/should_run/T11478.script new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/ghc-e/should_run/T11478.script diff --git a/testsuite/tests/ghc-e/should_run/T11478.stdout b/testsuite/tests/ghc-e/should_run/T11478.stdout new file mode 100644 index 0000000000..00750edc07 --- /dev/null +++ b/testsuite/tests/ghc-e/should_run/T11478.stdout @@ -0,0 +1 @@ +3 diff --git a/testsuite/tests/ghc-e/should_run/all.T b/testsuite/tests/ghc-e/should_run/all.T index dcb720723d..ae286538cc 100644 --- a/testsuite/tests/ghc-e/should_run/all.T +++ b/testsuite/tests/ghc-e/should_run/all.T @@ -16,3 +16,4 @@ 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']) +test('T11478', req_interp, run_command, ['$MAKE --no-print-directory -s T11478']) diff --git a/testsuite/tests/ghci/scripts/Makefile b/testsuite/tests/ghci/scripts/Makefile index 017555b78b..0b70318987 100644 --- a/testsuite/tests/ghci/scripts/Makefile +++ b/testsuite/tests/ghci/scripts/Makefile @@ -54,3 +54,10 @@ T10408: # and not be ignored when `-ignore-dot-ghci` is specified. '$(TEST_HC)' $(TEST_HC_OPTS) --interactive -v0 -ignore-dot-ghci \ -ghci-script T10408A.script -ghci-script T10408B.script < /dev/null + +.PHONY: T11389 +T11389: + # Test that "Loaded GHCi configuration" message is printed by default + # (without -v0) + '$(TEST_HC)' $(TEST_HC_OPTS) --interactive -ignore-dot-ghci \ + -ghci-script T11389.script < /dev/null | grep 'configuration' diff --git a/testsuite/tests/ghci/scripts/T10408.stdout b/testsuite/tests/ghci/scripts/T10408.stdout index cef83bc2a3..b13d0a49f8 100644 --- a/testsuite/tests/ghci/scripts/T10408.stdout +++ b/testsuite/tests/ghci/scripts/T10408.stdout @@ -1,4 +1,2 @@ "T10408A" -Loaded GHCi configuration from T10408A.script "T10408B" -Loaded GHCi configuration from T10408B.script diff --git a/testsuite/tests/ghci/scripts/T11389.script b/testsuite/tests/ghci/scripts/T11389.script new file mode 100644 index 0000000000..8b8441b91d --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11389.script @@ -0,0 +1 @@ +"test" diff --git a/testsuite/tests/ghci/scripts/T11389.stdout b/testsuite/tests/ghci/scripts/T11389.stdout new file mode 100644 index 0000000000..c92bf91e63 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11389.stdout @@ -0,0 +1 @@ +Loaded GHCi configuration from T11389.script diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 17bee5f56a..d9548996e7 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -240,3 +240,5 @@ test('T10576b', expect_broken(10576), ghci_script, ['T10576b.script']) test('T11051a', normal, ghci_script, ['T11051a.script']) test('T11051b', normal, ghci_script, ['T11051b.script']) test('T11266', check_stdout(lambda *args: 1), ghci_script, ['T11266.script']) + +test('T11389', req_interp, run_command, ['$MAKE -s --no-print-directory T11389']) |