From 7892dcd353ff0efd24ed753061b9be8e556b0177 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 11 Aug 2017 11:59:05 -0700 Subject: Command tests; print stderr when a test fails. --- test/Tests/Command.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3