@@ -23,7 +23,7 @@ runTest :: String -- ^ Title of test
23 -> String -- ^ Expected output
23 -> String -- ^ Expected output
24 -> TestTree
24 -> TestTree
25runTest testname cmd inp norm = testCase testname $ do
25runTest testname cmd inp norm = testCase testname $ do
26− let cmd' = cmd ++ " --quiet --data-dir ../data"
26+ let cmd' = cmd ++ " --data-dir ../data"
27 let findDynlibDir [] = Nothing
27 let findDynlibDir [] = Nothing
28 findDynlibDir ("build":xs) = Just $ joinPath (reverse xs) </> "build"
28 findDynlibDir ("build":xs) = Just $ joinPath (reverse xs) </> "build"
29 findDynlibDir (_:xs) = findDynlibDir xs
29 findDynlibDir (_:xs) = findDynlibDir xs
@@ -35,9 +35,9 @@ runTest testname cmd inp norm = testCase testname $ do
35 ("LD_LIBRARY_PATH", d)]
35 ("LD_LIBRARY_PATH", d)]
36 let env' = dynlibEnv ++ [("TMP","."),("LANG","en_US.UTF-8"),("HOME", "./")]
36 let env' = dynlibEnv ++ [("TMP","."),("LANG","en_US.UTF-8"),("HOME", "./")]
37 let pr = (shell cmd'){ env = Just env' }
37 let pr = (shell cmd'){ env = Just env' }
38− (ec, out', _err) <- readCreateProcessWithExitCode pr inp
38+ (ec, out', err') <- readCreateProcessWithExitCode pr inp
39 -- filter \r so the tests will work on Windows machines
39 -- filter \r so the tests will work on Windows machines
40− let out = filter (/= '\r') out'
40+ let out = filter (/= '\r') $ err' ++ out'
41 result <- if ec == ExitSuccess
41 result <- if ec == ExitSuccess
43 if out == norm
43 if out == norm