Idris2/tests/chez/chez017/dir.idr
Edwin Brady a972778eab Add test script
They don't all pass yet, for minor reasons. Coming shortly...
Unfortunately the startup overhead for chez is really noticeable here!
2020-05-19 18:25:18 +01:00

16 lines
434 B
Idris

import System.Directory
main : IO ()
main = do Right () <- createDir "testdir"
| Left err => printLn err
Left err <- createDir "testdir"
| _ => printLn "That wasn't supposed to work"
printLn err
ok <- changeDir "nosuchdir"
printLn ok
ok <- changeDir "testdir"
printLn ok
writeFile "test.txt" "hello\n"
printLn !currentDir