-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2d1e45
commit 51ff83e
Showing
12 changed files
with
35 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
. ../../testutils.sh | ||
|
||
run ReadDir.idr | ||
run --cg chez ReadDir.idr | ||
run --cg node ReadDir.idr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import System.File | ||
import System.Directory | ||
|
||
main : IO () | ||
main = do | ||
Left FileNotFound <- openFile "doesNotExist" Read | ||
| Right _ => putStrLn "expected FileNotFound error" | ||
| Left err => putStrLn "expected FileNotFound, got \{show err}" | ||
|
||
Left PermissionDenied <- openFile "read_only.txt" ReadWrite | ||
| Right _ => putStrLn "expected PermissionDenied error" | ||
| Left err => putStrLn "expected PermissionDenied, got \{show err}" | ||
|
||
Left FileExists <- createDir "build" | ||
| Right _ => putStrLn "expected FileExists error" | ||
| Left err => putStrLn "expected FileExists, got \{show err}" | ||
|
||
putStrLn "done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This file should be read only. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
. ../../testutils.sh | ||
|
||
chmod 444 read_only.txt | ||
run --cg chez FileErrors.idr | ||
run --cg node FileErrors.idr |
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.