aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command/auto.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-25 09:22:38 -0400
committerEduardo Julian2020-12-25 09:22:38 -0400
commit4ca397765805eda5ddee393901ed3a02001a960a (patch)
tree2ab184a1a4e244f3a69e86c8a7bb3ad49c22b4a3 /stdlib/source/test/aedifex/command/auto.lux
parentd29e091e98dabb8dfcf816899ada480ecbf7e357 (diff)
Replaced kebab-case with snake_case for naming convention.
Diffstat (limited to 'stdlib/source/test/aedifex/command/auto.lux')
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux56
1 files changed, 28 insertions, 28 deletions
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index c43d8642f..817b4db5f 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -47,26 +47,26 @@
["#." dependency
["#/." resolution (#+ Resolution)]]]]]})
-(def: (command end-signal dummy-files)
+(def: (command end_signal dummy_files)
(-> Text (List Path)
[(Atom [Nat (List Path)])
(-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command Any))])
(let [@runs (: (Atom [Nat (List Path)])
- (atom.atom [0 dummy-files]))]
+ (atom.atom [0 dummy_files]))]
[@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 remaining_files] (promise.future
+ (atom.update (function (_ [runs remaining_files])
+ [(inc runs) remaining_files])
@runs))]
- (case remaining-files
+ (case remaining_files
#.Nil
- (wrap (#try.Failure end-signal))
+ (wrap (#try.Failure end_signal))
(#.Cons head tail)
(do (try.with !)
- [_ (!.use (\ fs create-file) [head])]
+ [_ (!.use (\ fs create_file) [head])]
(do !
[_ (promise.future (atom.write [runs tail] @runs))]
(wrap (#try.Success [])))))))]))
@@ -77,47 +77,47 @@
(do {! random.monad}
[#let [/ (\ file.default separator)
[fs watcher] (watch.mock /)]
- end-signal (random.ascii/alpha 5)
+ 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)
+ 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
+ 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)
+ with_target (: (-> Profile Profile)
(set@ #///.target (#.Some target)))
- with-program (: (-> Profile Profile)
+ with_program (: (-> Profile Profile)
(set@ #///.program (#.Some program)))
- profile (|> empty-profile
- with-program
- with-target
- (set@ #///.sources (set.from-list text.hash (list source))))]
+ profile (|> empty_profile
+ with_program
+ with_target
+ (set@ #///.sources (set.from_list text.hash (list source))))]
resolution @build.resolution]
($_ _.and
(wrap (do promise.monad
[verdict (do ///action.monad
- [#let [[@runs command] (..command end-signal dummy-files)]
- _ (!.use (\ fs create-directory) [source])
+ [#let [[@runs command] (..command end_signal dummy_files)]
+ _ (!.use (\ fs create_directory) [source])
_ (\ watcher poll [])]
(do promise.monad
[outcome ((/.do! watcher command)
(@version.echo "")
- (program.async (program.mock environment.empty home working-directory))
+ (program.async (program.mock environment.empty home working_directory))
fs
- (@build.good-shell [])
+ (@build.good_shell [])
resolution
profile)
- [actual-runs _] (promise.future (atom.read @runs))]
- (wrap (#try.Success (and (n.= expected-runs actual-runs)
+ [actual_runs _] (promise.future (atom.read @runs))]
+ (wrap (#try.Success (and (n.= expected_runs actual_runs)
(case outcome
(#try.Failure error)
- (is? end-signal error)
+ (is? end_signal error)
(#try.Success _)
false))))))]