aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command/auto.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-06-24 03:42:57 -0400
committerEduardo Julian2021-06-24 03:42:57 -0400
commitce1a7a131f7c4df8eae5c019eba2893b56f04d46 (patch)
tree645c4b42c4b9bff141b7390d9f33f3f1fe4aeea1 /stdlib/source/test/aedifex/command/auto.lux
parenta82bd1eabe94763162c2b0707d9c198fbe9835e3 (diff)
Added a macro for type-casting JVM objects.
Diffstat (limited to 'stdlib/source/test/aedifex/command/auto.lux')
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux29
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))]