diff options
Diffstat (limited to 'stdlib/source/test/lux/world/file.lux')
-rw-r--r-- | stdlib/source/test/lux/world/file.lux | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux index 91f7ba0be..d13a024e7 100644 --- a/stdlib/source/test/lux/world/file.lux +++ b/stdlib/source/test/lux/world/file.lux @@ -15,6 +15,7 @@ ["." binary (#+ Binary)] ["." text] [number + ["n" nat] ["i" int]] [collection ["." list]]] @@ -68,7 +69,7 @@ Test (<| (_.context (%.name (name-of /._))) (do r.monad - [file-size (|> r.nat (:: @ map (|>> (n/% 100) (n/max 10)))) + [file-size (|> r.nat (:: @ map (|>> (n.% 100) (n.max 10)))) dataL (_binary.binary file-size) dataR (_binary.binary file-size) new-modified (|> r.int (:: @ map (|>> i.abs @@ -86,7 +87,7 @@ _ (!.use (:: file over-write) dataL) read-size (!.use (:: file size) []) _ (!.use (:: file delete) [])] - (wrap (n/= file-size read-size))))] + (wrap (n.= file-size read-size))))] (_.assert "Can read file size." (try.default #0 result)))) (wrap (do promise.monad @@ -99,7 +100,7 @@ content (!.use (:: file content) []) read-size (!.use (:: file size) []) _ (!.use (:: file delete) [])] - (wrap (and (n/= (n/* 2 file-size) read-size) + (wrap (and (n.= (n.* 2 file-size) read-size) (:: binary.equivalence = dataL (try.assume (binary.slice 0 (dec file-size) content))) @@ -135,7 +136,7 @@ read-size (!.use (:: file size) []) _ (!.use (:: file delete) []) _ (!.use (:: dir discard) [])] - (wrap (n/= file-size read-size))))] + (wrap (n.= file-size read-size))))] (_.assert "Can create files inside of directories." (try.default #0 result)))) (wrap (do promise.monad @@ -156,10 +157,10 @@ _ (!.use (:: file delete) []) _ (!.use (:: inner-dir discard) []) _ (!.use (:: dir discard) [])] - (wrap (and (and (n/= 0 (list.size pre-files)) - (n/= 0 (list.size pre-directories))) - (and (n/= 1 (list.size post-files)) - (n/= 1 (list.size post-directories)))))))] + (wrap (and (and (n.= 0 (list.size pre-files)) + (n.= 0 (list.size pre-directories))) + (and (n.= 1 (list.size post-files)) + (n.= 1 (list.size post-directories)))))))] (_.assert "Can list files/directories inside a directory." (try.default #0 result)))) (wrap (do promise.monad |