diff options
author | Eduardo Julian | 2022-07-28 17:39:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-07-28 17:39:01 -0400 |
commit | a4b64bf1cdf47160b6b615d2c6493039abfd7a94 (patch) | |
tree | 3fe8c149d9cad89bbf067c736d196260203d1a01 /stdlib/source/test/lux/world/file.lux | |
parent | a4847190df926d35f7ece97da50a2a8b1462a24f (diff) |
Extracted unit-testing machinery into its own module.
Diffstat (limited to 'stdlib/source/test/lux/world/file.lux')
-rw-r--r-- | stdlib/source/test/lux/world/file.lux | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux index faebedb1f..ff12cb791 100644 --- a/stdlib/source/test/lux/world/file.lux +++ b/stdlib/source/test/lux/world/file.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract ["[0]" monad (.only do)]] [control @@ -24,7 +23,9 @@ ["^" pattern]]] [world [time - ["[0]" instant (.only Instant)]]]]] + ["[0]" instant (.only Instant)]]] + ["_" test (.only Test) + ["[0]" unit]]]] ["[0]" / ["[1][0]" watch]] [\\library @@ -255,7 +256,7 @@ (in (do async.monad [.let [fs (/.mock /)] ? (at fs delete file)] - (_.coverage' [/.cannot_delete] + (unit.coverage [/.cannot_delete] (case ? {try.#Failure error} (exception.match? /.cannot_delete error) @@ -265,7 +266,7 @@ (in (do async.monad [.let [fs (/.mock /)] ? (at fs read file)] - (_.coverage' [/.cannot_find_file] + (unit.coverage [/.cannot_find_file] (case ? {try.#Failure error} (exception.match? /.cannot_find_file error) @@ -276,7 +277,7 @@ [.let [fs (/.mock /)] ?/0 (at fs directory_files file) ?/1 (at fs sub_directories file)] - (_.coverage' [/.cannot_find_directory] + (unit.coverage [/.cannot_find_directory] (case [?/0 ?/1] [{try.#Failure error/0} {try.#Failure error/1}] (and (exception.match? /.cannot_find_directory error/0) |