Fix in scheme backend and test script

At least on Linux, \r needs to be in singles quotes as an argument to tr
or it removes all the 'r' instead! Hopefully it also works this way on
Windows...
This commit is contained in:
Edwin Brady 2019-07-10 17:23:45 +02:00
parent a422294f36
commit 9f6a3fd2b8
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ escapeQuotes s = pack $ foldr escape [] $ unpack s
schHeader : String -> List String -> String
schHeader chez libs
= if os /= "windows" then "#!" ++ chez ++ " --script\n\n" else "" ++
= (if os /= "windows" then "#!" ++ chez ++ " --script\n\n" else "") ++
"(import (chezscheme))\n" ++
"(case (machine-type)\n" ++
" [(i3le ti3le a6le ta6le) (load-shared-object \"libc.so.6\")]\n" ++

View File

@ -70,7 +70,7 @@ runTest : String -> String -> String -> IO Bool
runTest dir prog test
= do chdir (dir ++ "/" ++ test)
putStr $ dir ++ "/" ++ test ++ ": "
system $ "sh ./run " ++ prog ++ " | tr -d \\r > output"
system $ "sh ./run " ++ prog ++ " | tr -d '\\r' > output"
Right out <- readFile "output"
| Left err => do print err
pure False