summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-25 11:51:50 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-25 11:51:50 +0200
commit895866222cd79e693c34b6199fd1dc1475ffe125 (patch)
treeafbc6a184a527156a4923e5a382c1f13b18f153c
parent8f2c803f973d53da340c876edbbcb2b1223f35cd (diff)
Test.Command: put stderr output at front, so it can be tested.
-rw-r--r--test/Tests/Command.hs6
1 files 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