aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command/clean.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-27 03:51:10 -0400
committerEduardo Julian2021-07-27 03:51:10 -0400
commit061fd8a209bbcaffc2bfb850ac6046752a567d50 (patch)
tree8cd83ad7d0bc06ded7976eb5420467e485733ae8 /stdlib/source/test/aedifex/command/clean.lux
parente64b6d0114c26a455e19a416b5f02a4d19dd711f (diff)
Re-named wrap => in && unwrap => out.
Diffstat (limited to 'stdlib/source/test/aedifex/command/clean.lux')
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux58
1 files changed, 29 insertions, 29 deletions
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 568c6fb76..238fa824b 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -46,8 +46,8 @@
[count (\ ! map (n.% 10) random.nat)
names (random.set text.hash count ..node_name)
contents (random.list count ($binary.random 100))]
- (wrap (list.zipped/2 (list\map (|>> (format prefix)) (set.to_list names))
- contents))))
+ (in (list.zipped/2 (list\map (|>> (format prefix)) (set.to_list names))
+ contents))))
(def: (create_file! fs [path content])
(-> (file.System Async) [Path Binary] (Async (Try Any)))
@@ -59,15 +59,15 @@
[_ (: (Async (Try Any))
(file.make_directories async.monad fs path))
_ (monad.map ! (..create_file! fs) files)]
- (wrap [])))
+ (in [])))
(def: (directory_exists? fs)
(-> (file.System Async) Path (Async (Try Bit)))
- (|>> (\ fs directory?) (try.lift async.monad)))
+ (|>> (\ fs directory?) (try.lifted async.monad)))
(def: (file_exists? fs)
(-> (file.System Async) Path (Async (Try Bit)))
- (|>> (\ fs file?) (try.lift async.monad)))
+ (|>> (\ fs file?) (try.lifted async.monad)))
(def: (assets_exist? fs directory_path files)
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Bit)))
@@ -77,8 +77,8 @@
(|> files
(list\map product.left)
(monad.map ///action.monad (..file_exists? fs))))]
- (wrap (and directory_exists?
- (list.every? (|>>) files_exist?)))))
+ (in (and directory_exists?
+ (list.every? (|>>) files_exist?)))))
(def: #export test
Test
@@ -95,25 +95,25 @@
sub_files (..files (format sub_path /))
dummy @profile.random]
- (wrap (do async.monad
- [#let [console (@version.echo "")]
- verdict (do {! (try.with async.monad)}
- [_ (..create_directory! fs target_path direct_files)
- _ (..create_directory! fs sub_path sub_files)
- context_exists!/pre (..directory_exists? fs context)
- target_exists!/pre (..assets_exist? fs target_path direct_files)
- sub_exists!/pre (..assets_exist? fs sub_path sub_files)
- _ (/.do! console fs (set@ #///.target target_path dummy))
- context_exists!/post (..directory_exists? fs context)
- target_exists!/post (..assets_exist? fs target_path direct_files)
- sub_exists!/post (..assets_exist? fs sub_path sub_files)
- logging (\ console read_line [])]
- (wrap (and (and context_exists!/pre
- context_exists!/post)
- (and target_exists!/pre
- (not target_exists!/post))
- (and sub_exists!/pre
- (not sub_exists!/post))
- (text\= (/.success target_path) logging))))]
- (_.cover' [/.do! /.success]
- (try.default false verdict)))))))
+ (in (do async.monad
+ [#let [console (@version.echo "")]
+ verdict (do {! (try.with async.monad)}
+ [_ (..create_directory! fs target_path direct_files)
+ _ (..create_directory! fs sub_path sub_files)
+ context_exists!/pre (..directory_exists? fs context)
+ target_exists!/pre (..assets_exist? fs target_path direct_files)
+ sub_exists!/pre (..assets_exist? fs sub_path sub_files)
+ _ (/.do! console fs (set@ #///.target target_path dummy))
+ context_exists!/post (..directory_exists? fs context)
+ target_exists!/post (..assets_exist? fs target_path direct_files)
+ sub_exists!/post (..assets_exist? fs sub_path sub_files)
+ logging (\ console read_line [])]
+ (in (and (and context_exists!/pre
+ context_exists!/post)
+ (and target_exists!/pre
+ (not target_exists!/post))
+ (and sub_exists!/pre
+ (not sub_exists!/post))
+ (text\= (/.success target_path) logging))))]
+ (_.cover' [/.do! /.success]
+ (try.default false verdict)))))))