[commit: ghc] master: Testsuite: fix T11827 (#11827) (470def9)

git at git.haskell.org git at git.haskell.org
Thu May 19 14:05:00 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/470def9a98a89ead3d162af9ea4dabb28a58dfed/ghc

>---------------------------------------------------------------

commit 470def9a98a89ead3d162af9ea4dabb28a58dfed
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Thu May 19 14:29:44 2016 +0200

    Testsuite: fix T11827 (#11827)
    
    It didn't trigger the bug before.


>---------------------------------------------------------------

470def9a98a89ead3d162af9ea4dabb28a58dfed
 testsuite/tests/ghci/T11827/T11827.script | 10 ++++++++++
 testsuite/tests/ghci/T11827/all.T         |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/ghci/T11827/T11827.script b/testsuite/tests/ghci/T11827/T11827.script
index fa13992..e3629e6 100644
--- a/testsuite/tests/ghci/T11827/T11827.script
+++ b/testsuite/tests/ghci/T11827/T11827.script
@@ -1 +1,11 @@
 :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 d31f6af..e2740f8 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'])



More information about the ghc-commits mailing list