git.iko.soy/typeable/pandoc
on master help sign in
Test.Command: put stderr output at front, so it can be tested.
commit895866222cd79e693c34b6199fd1dc1475ffe125 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 25 May 2017, 11:51 (9 years ago) parent8f2c803
1 file changed+3−3
test/Tests/Command.hs+3−3
test/Tests/Command.hs+3−3
@@ -23,7 +23,7 @@ runTest :: String -- ^ Title of test
2323 -> String -- ^ Expected output
2424 -> TestTree
2525runTest testname cmd inp norm = testCase testname $ do
26− let cmd' = cmd ++ " --quiet --data-dir ../data"
26+ let cmd' = cmd ++ " --data-dir ../data"
2727 let findDynlibDir [] = Nothing
2828 findDynlibDir ("build":xs) = Just $ joinPath (reverse xs) </> "build"
2929 findDynlibDir (_:xs) = findDynlibDir xs
@@ -35,9 +35,9 @@ runTest testname cmd inp norm = testCase testname $ do
3535 ("LD_LIBRARY_PATH", d)]
3636 let env' = dynlibEnv ++ [("TMP","."),("LANG","en_US.UTF-8"),("HOME", "./")]
3737 let pr = (shell cmd'){ env = Just env' }
38− (ec, out', _err) <- readCreateProcessWithExitCode pr inp
38+ (ec, out', err') <- readCreateProcessWithExitCode pr inp
3939 -- filter \r so the tests will work on Windows machines
40− let out = filter (/= '\r') out'
40+ let out = filter (/= '\r') $ err' ++ out'
4141 result <- if ec == ExitSuccess
4242 then do
4343 if out == norm