From 895866222cd79e693c34b6199fd1dc1475ffe125 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 25 May 2017 11:51:50 +0200 Subject: Test.Command: put stderr output at front, so it can be tested. --- test/Tests/Command.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs index 054ceb50d..588c0c06c 100644 --- a/test/Tests/Command.hs +++ b/test/Tests/Command.hs @@ -23,7 +23,7 @@ runTest :: String -- ^ Title of test -> String -- ^ Expected output -> TestTree runTest testname cmd inp norm = testCase testname $ do - let cmd' = cmd ++ " --quiet --data-dir ../data" + let cmd' = cmd ++ " --data-dir ../data" let findDynlibDir [] = Nothing findDynlibDir ("build":xs) = Just $ joinPath (reverse xs) "build" findDynlibDir (_:xs) = findDynlibDir xs @@ -35,9 +35,9 @@ runTest testname cmd inp norm = testCase testname $ do ("LD_LIBRARY_PATH", d)] let env' = dynlibEnv ++ [("TMP","."),("LANG","en_US.UTF-8"),("HOME", "./")] let pr = (shell cmd'){ env = Just env' } - (ec, out', _err) <- readCreateProcessWithExitCode pr inp + (ec, out', err') <- readCreateProcessWithExitCode pr inp -- filter \r so the tests will work on Windows machines - let out = filter (/= '\r') out' + let out = filter (/= '\r') $ err' ++ out' result <- if ec == ExitSuccess then do if out == norm -- cgit v1.2.3