summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-08-11 11:59:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-11 22:09:15 -0700
commit7892dcd353ff0efd24ed753061b9be8e556b0177 (patch)
treea123859f8164ce1e1d347325be5de5000d650987
parent54cc8e2702b342c09de624240b835efc53666bb7 (diff)
Command tests; print stderr when a test fails.
-rw-r--r--test/Tests/Command.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs
index 1f3694f60..24e7a67d9 100644
--- a/test/Tests/Command.hs
+++ b/test/Tests/Command.hs
@@ -8,6 +8,7 @@ import System.Directory
import System.Exit
import System.FilePath (joinPath, splitDirectories, takeDirectory, (</>))
import System.Process
+import System.IO (stderr, hPutStr)
import Test.Tasty
import Test.Tasty.HUnit
import Tests.Helpers
@@ -46,7 +47,9 @@ runTest testname cmd inp norm = testCase testname $ do
else return
$ TestFailed cmd "expected"
$ getDiff (lines out) (lines norm)
- else return $ TestError ec
+ else do
+ hPutStr stderr err'
+ return $ TestError ec
assertBool (show result) (result == TestPassed)
tests :: TestTree