File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,9 @@ normalize str =
196
196
Result : Type
197
197
Result = Either String String
198
198
199
+ guardPath : String -> String
200
+ guardPath s = " \" " ++ s ++ " \" "
201
+
199
202
||| Run the specified Golden test with the supplied options.
200
203
||| See the module documentation for more information.
201
204
||| @testPath the directory that contains the test.
@@ -205,7 +208,7 @@ runTest opts testPath = forkIO $ do
205
208
start <- clockTime UTC
206
209
let cg = maybe " " (" --cg " ++ ) (codegen opts)
207
210
let exe = " \" " ++ exeUnderTest opts ++ cg ++ " \" "
208
- ignore $ system $ " cd \" " ++ testPath ++ " \ " && " ++
211
+ ignore $ system $ " cd " ++ guardPath testPath ++ " && " ++
209
212
" sh ./run " ++ exe ++ " | tr -d '\\ r' > output"
210
213
end <- clockTime UTC
211
214
@@ -263,7 +266,7 @@ runTest opts testPath = forkIO $ do
263
266
Just exp => do
264
267
code <- system $ " git diff --no-index --exit-code " ++
265
268
(if opts. color then " --word-diff=color " else " " ) ++
266
- testPath ++ " /expected " ++ testPath ++ " /output"
269
+ guardPath testPath ++ " /expected " ++ guardPath testPath ++ " /output"
267
270
putStr . unlines $
268
271
[" Golden value differs from actual value." ] ++
269
272
(if (code < 0 ) then expVsOut exp out else []) ++
You can’t perform that action at this time.
0 commit comments