summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-05-19 14:29:44 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2016-05-19 16:08:11 +0200
commit470def9a98a89ead3d162af9ea4dabb28a58dfed (patch)
tree7b1878584222d07aeabfda4c65c2b3d4336b76c1 /testsuite
parent358567a34bdb06b639d081a1c013d9cdd64709f0 (diff)
downloadhaskell-470def9a98a89ead3d162af9ea4dabb28a58dfed.tar.gz
Testsuite: fix T11827 (#11827)
It didn't trigger the bug before.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghci/T11827/T11827.script12
-rw-r--r--testsuite/tests/ghci/T11827/all.T2
2 files changed, 12 insertions, 2 deletions
diff --git a/testsuite/tests/ghci/T11827/T11827.script b/testsuite/tests/ghci/T11827/T11827.script
index fa139925d9..e3629e6e1b 100644
--- a/testsuite/tests/ghci/T11827/T11827.script
+++ b/testsuite/tests/ghci/T11827/T11827.script
@@ -1 +1,11 @@
-:load B.hs \ No newline at end of file
+:load B.hs
+
+-- The testsuite driver runs ghci script tests by default with `-v0`, which
+-- prevents the bug from triggering. By adding a `:show modules` here, we do
+-- trigger the bug.
+--
+-- Adding the setup function `extra_run_opts('-v1')` would also work, but it
+-- annoyingly prints the ghc version number, which would make the expected
+-- test output dependent on that version number.
+
+:show modules
diff --git a/testsuite/tests/ghci/T11827/all.T b/testsuite/tests/ghci/T11827/all.T
index d31f6afc9a..e2740f849c 100644
--- a/testsuite/tests/ghci/T11827/all.T
+++ b/testsuite/tests/ghci/T11827/all.T
@@ -1,4 +1,4 @@
test('T11827',
[extra_clean(['A.hi', 'A.hi-boot', 'A.o', 'B.hi', 'B.o']),
- exit_code(1), expect_broken(11827)],
+ expect_broken(11827)],
ghci_script, ['T11827.script'])