diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/aedifex/command/auto.lux | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux index 7bac6eb5d..c23519bcc 100644 --- a/stdlib/source/test/aedifex/command/auto.lux +++ b/stdlib/source/test/aedifex/command/auto.lux @@ -20,7 +20,7 @@ ["." set] ["." list ("#\." functor)]]] [math - ["." random] + ["." random (#+ Random)] [number ["n" nat]]] [world @@ -56,10 +56,10 @@ [@runs (function (_ console program fs shell resolution profile) (do {! promise.monad} - [[runs remaining_files] (promise.future - (atom.update (function (_ [runs remaining_files]) - [(inc runs) remaining_files]) - @runs))] + [[_ [runs remaining_files]] (promise.future + (atom.update (function (_ [runs remaining_files]) + [(inc runs) remaining_files]) + @runs))] (case remaining_files #.Nil (wrap (#try.Failure end_signal)) @@ -78,15 +78,10 @@ [#let [/ (\ file.default separator) [fs watcher] (watch.mock /)] end_signal (random.ascii/alpha 5) + program (random.ascii/alpha 5) target (random.ascii/alpha 5) - home (random.ascii/alpha 5) - working_directory (random.ascii/alpha 5) - expected_runs (\ ! map (|>> (n.% 10) (n.max 2)) random.nat) source (random.ascii/alpha 5) - dummy_files (|> (random.ascii/alpha 5) - (random.set text.hash (dec expected_runs)) - (\ ! map (|>> set.to_list (list\map (|>> (format source /)))))) #let [empty_profile (: Profile (\ ///.monoid identity)) with_target (: (-> Profile Profile) @@ -98,6 +93,14 @@ with_program with_target (set@ #///.sources (set.from_list text.hash (list source))))] + + home (random.ascii/alpha 5) + working_directory (random.ascii/alpha 5) + + expected_runs (\ ! map (|>> (n.% 10) (n.max 2)) random.nat) + dummy_files (|> (random.ascii/alpha 5) + (random.set text.hash (dec expected_runs)) + (\ ! map (|>> set.to_list (list\map (|>> (format source /)))))) resolution @build.resolution] ($_ _.and (wrap (do promise.monad @@ -106,11 +109,11 @@ _ (!.use (\ fs create_directory) [source]) _ (\ watcher poll [])] (do promise.monad - [outcome ((/.do! watcher command) + [outcome ((/.do! 1 watcher command) (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs - (@build.good_shell []) + (shell.async (@build.good_shell [])) resolution profile) [actual_runs _] (promise.future (atom.read @runs))] |