Skip to content

Commit 3bf8a44

Browse files
committed
Temporary hack to get the test reliably working
1 parent 754a35c commit 3bf8a44

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/Test.purs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ main = do
4141
log $ "Caught readTextFile error:\n" ++ show err
4242
return "") $ S.readTextFile UTF8 (fp ["examples", "does not exist"])
4343

44+
-- If an error is thrown, it's probably EEXIST, so ignore it. Should
45+
-- really check this instead.
46+
catchException' (const (return unit)) (S.mkdir "tmp")
47+
48+
S.writeTextFile ASCII (fp ["tmp", "Test.js"]) "console.log('hello world')"
4449
S.rename (fp ["tmp", "Test.js"]) (fp ["tmp", "Test1.js"])
4550

4651
S.truncate (fp ["tmp", "Test1.js"]) 1000

0 commit comments

Comments
 (0)