mirror of
https://github.com/ocaml-multicore/eio.git
synced 2025-08-29 00:03:47 -04:00
Make read_dir tests consistent with others
This commit is contained in:
parent
4a9bde55f6
commit
d7b5465ed6
@ -33,8 +33,8 @@ let try_mkdir dir path =
|
||||
|
||||
let try_read_dir dir path =
|
||||
match Eio.Dir.read_dir dir path with
|
||||
| names -> traceln "read_dir [ %a ] -> ok" Fmt.(list ~sep:Fmt.comma string) names
|
||||
| exception ex -> traceln "read_dir %a" Fmt.exn ex
|
||||
| names -> traceln "read_dir %S -> %a" path Fmt.Dump.(list string) names
|
||||
| exception ex -> traceln "read_dir %S -> %a" path Fmt.exn ex
|
||||
|
||||
let chdir path =
|
||||
traceln "chdir %S" path;
|
||||
@ -245,9 +245,9 @@ Reading directory entries under `cwd` and outside of `cwd`.
|
||||
+chdir "readdir"
|
||||
+mkdir "test-1" -> ok
|
||||
+mkdir "test-2" -> ok
|
||||
+read_dir [ test-1, test-2 ] -> ok
|
||||
+read_dir Eio.Dir.Permission_denied ("..", _)
|
||||
+read_dir Eio.Dir.Not_found ("test-3", _)
|
||||
+read_dir "." -> ["test-1"; "test-2"]
|
||||
+read_dir ".." -> Eio.Dir.Permission_denied ("..", _)
|
||||
+read_dir "test-3" -> Eio.Dir.Not_found ("test-3", _)
|
||||
+chdir ".."
|
||||
- : unit = ()
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user