diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-08-11 11:59:05 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-11 22:09:15 -0700 |
commit | 7892dcd353ff0efd24ed753061b9be8e556b0177 (patch) | |
tree | a123859f8164ce1e1d347325be5de5000d650987 /test/Tests | |
parent | 54cc8e2702b342c09de624240b835efc53666bb7 (diff) |
Command tests; print stderr when a test fails.
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Command.hs | 5 |
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 |