aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command
diff options
context:
space:
mode:
authorEduardo Julian2021-07-02 03:11:36 -0400
committerEduardo Julian2021-07-02 03:11:36 -0400
commit5cf4efa861075f8276f43a2516f5beacaf610b44 (patch)
treee21cf528d960c29d22cbc7e41180fa09e62f16d6 /stdlib/source/test/aedifex/command
parent744ee69630de59ca3ba660b0aab6361cd17ce1b4 (diff)
No longer employing the capabilities model on the lux/world/* modules.
Capabilities should be opt-in, but using them in the standard library makes them mandatory.
Diffstat (limited to 'stdlib/source/test/aedifex/command')
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux10
-rw-r--r--stdlib/source/test/aedifex/command/build.lux16
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux8
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux6
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux2
-rw-r--r--stdlib/source/test/aedifex/command/install.lux4
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux8
-rw-r--r--stdlib/source/test/aedifex/command/test.lux22
-rw-r--r--stdlib/source/test/aedifex/command/version.lux14
9 files changed, 36 insertions, 54 deletions
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 7ef74d2c0..0808c7d21 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -9,9 +9,7 @@
["." environment (#+ Environment)]]
[concurrency
["." atom (#+ Atom)]
- ["." promise (#+ Promise)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise)]]]
[data
["." text
["%" format (#+ format)]
@@ -62,7 +60,7 @@
(if (n.= expected_runs actual_runs)
(wrap (#try.Failure end_signal))
(do (try.with !)
- [_ (!.use (\ dummy_file over_write) (\ utf8.codec encode (%.nat actual_runs)))]
+ [_ (\ dummy_file over_write (\ utf8.codec encode (%.nat actual_runs)))]
(do !
[_ (promise.future (atom.write actual_runs @runs))]
(wrap (#try.Success [])))))))]))
@@ -99,8 +97,8 @@
($_ _.and
(wrap (do promise.monad
[verdict (do ///action.monad
- [_ (!.use (\ fs create_directory) [source])
- dummy_file (!.use (\ fs create_file) [dummy_path])
+ [_ (\ fs create_directory source)
+ dummy_file (\ fs create_file dummy_path)
#let [[@runs command] (..command expected_runs end_signal dummy_file)]
_ (\ watcher poll [])]
(do promise.monad
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index 0e86ef946..9d37ceb00 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -10,9 +10,7 @@
[concurrency
["." promise (#+ Promise)]]
[parser
- ["." environment]]
- [security
- ["!" capability]]]
+ ["." environment]]]
[data
["." text ("#\." equivalence)]
[collection
@@ -42,7 +40,7 @@
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
(#try.Success
- (: (shell.Simulation [])
+ (: (shell.Mock [])
(implementation
(def: (on_read state)
(exception.throw shell.no_more_output []))
@@ -60,7 +58,7 @@
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
(#try.Success
- (: (shell.Simulation [])
+ (: (shell.Mock [])
(implementation
(def: (on_read state)
(exception.throw shell.no_more_output []))
@@ -142,8 +140,8 @@
(wrap (do promise.monad
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs shell resolution profile)
- start (!.use (\ console read_line) [])
- end (!.use (\ console read_line) [])]
+ start (\ console read_line [])
+ end (\ console read_line [])]
(wrap (and (text\= /.start start)
(text\= /.success end))))]
(_.cover' [/.do!
@@ -156,8 +154,8 @@
(wrap (do promise.monad
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async (..bad_shell [])) resolution profile)
- start (!.use (\ console read_line) [])
- end (!.use (\ console read_line) [])]
+ start (\ console read_line [])
+ end (\ console read_line [])]
(wrap (and (text\= /.start start)
(text\= /.failure end))))]
(_.cover' [/.failure]
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 705cca7f2..18997e02e 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -6,9 +6,7 @@
[control
["." try (#+ Try)]
[concurrency
- ["." promise (#+ Promise)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise)]]]
[data
[binary (#+ Binary)]
["." product]
@@ -55,7 +53,7 @@
(do {! (try.with promise.monad)}
[file (: (Promise (Try (File Promise)))
(file.get_file promise.monad fs path))]
- (!.use (\ file over_write) content)))
+ (\ file over_write content)))
(def: (create_directory! fs path files)
(-> (file.System Promise) Path (List [Path Binary]) (Promise (Try Any)))
@@ -111,7 +109,7 @@
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 (!.use (\ console read_line) [])]
+ logging (\ console read_line [])]
(wrap (and (and context_exists!/pre
context_exists!/post)
(and target_exists!/pre
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 7e1bf166e..fd4395935 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -8,8 +8,6 @@
["." exception]
[concurrency
["." promise (#+ Promise)]]
- [security
- ["!" capability]]
[parser
["." environment (#+ Environment)]]]
[data
@@ -80,7 +78,7 @@
[#let [console (@version.echo "")]
_ (..make_sources! fs (get@ #///.sources profile))
_ (/.do! console repository fs artifact profile)]
- (!.use (\ console read_line) [])))
+ (\ console read_line [])))
(def: #export test
Test
@@ -96,7 +94,7 @@
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- #let [repository (///repository.mock @repository.simulation
+ #let [repository (///repository.mock @repository.mock
@repository.empty)
fs (file.mock (\ file.default separator))
program (program.async (program.mock environment.empty home working_directory))]]
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index 2b4898dd3..ecb34437a 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -8,8 +8,6 @@
["." try]
[concurrency
["." promise]]
- [security
- ["!" capability]]
[parser
["." environment]]]
[data
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index 8096fc2b2..bb52b3cca 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -8,8 +8,6 @@
["." exception]
[concurrency
["." promise (#+ Promise)]]
- [security
- ["!" capability]]
[parser
["." environment (#+ Environment)]]]
[data
@@ -70,7 +68,7 @@
[#let [console (@version.echo "")]
_ (..make_sources! fs (get@ #///.sources sample))
_ (/.do! console fs (///repository/local.repository program fs) sample)]
- (!.use (\ console read_line) [])))
+ (\ console read_line [])))
(def: #export test
Test
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index f7f182225..0338bf7c4 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -6,9 +6,7 @@
[control
["." try (#+ Try) ("#\." functor)]
[concurrency
- ["." promise (#+ Promise)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise)]]]
[data
["." binary]
["." text ("#\." equivalence)
@@ -51,11 +49,11 @@
(\ ! wrap))
file (: (Promise (Try (File Promise)))
(file.get_file promise.monad fs path))
- actual (!.use (\ file content) [])
+ actual (\ file content [])
logging! (\ ///action.monad map
(text\= /.success)
- (!.use (\ console read_line) []))
+ (\ console read_line []))
#let [expected_path!
(text\= ///pom.file path)
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index cad06aa69..47e2ed2b3 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -9,9 +9,7 @@
[concurrency
["." promise]]
[parser
- ["." environment]]
- [security
- ["!" capability]]]
+ ["." environment]]]
[data
["." text ("#\." equivalence)]
[collection
@@ -65,10 +63,10 @@
(wrap (do promise.monad
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async (@build.good_shell [])) resolution profile)
- build_start (!.use (\ console read_line) [])
- build_end (!.use (\ console read_line) [])
- test_start (!.use (\ console read_line) [])
- test_end (!.use (\ console read_line) [])]
+ build_start (\ console read_line [])
+ build_end (\ console read_line [])
+ test_start (\ console read_line [])
+ test_end (\ console read_line [])]
(wrap (and (and (text\= //build.start build_start)
(text\= //build.success build_end))
(and (text\= /.start test_start)
@@ -83,7 +81,7 @@
[#let [bad_shell (shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
(#try.Success
- (: (shell.Simulation [])
+ (: (shell.Mock [])
(implementation
(def: (on_read state)
(exception.throw shell.no_more_output []))
@@ -99,10 +97,10 @@
shell.error)]))))))
[])]
_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async bad_shell) resolution profile)
- build_start (!.use (\ console read_line) [])
- build_end (!.use (\ console read_line) [])
- test_start (!.use (\ console read_line) [])
- test_end (!.use (\ console read_line) [])]
+ build_start (\ console read_line [])
+ build_end (\ console read_line [])
+ test_start (\ console read_line [])
+ test_end (\ console read_line [])]
(wrap (and (and (text\= //build.start build_start)
(text\= //build.success build_end))
(and (text\= /.start test_start)
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
index 079b0fde4..1bbb7f874 100644
--- a/stdlib/source/test/aedifex/command/version.lux
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -7,9 +7,7 @@
["." try]
["." exception (#+ exception:)]
[concurrency
- ["." promise (#+ Promise)]]
- [security
- ["!" capability]]]
+ ["." promise (#+ Promise)]]]
[data
["." maybe]
["." text ("#\." equivalence)
@@ -23,7 +21,7 @@
["#/." lux #_
["#" version]]]]]
[world
- ["." console (#+ Console Simulation)]]]
+ ["." console (#+ Console Mock)]]]
[///
["@." profile]]
{#program
@@ -31,8 +29,8 @@
(exception: #export console_is_closed!)
-(implementation: simulation
- (Simulation [Bit Text])
+(implementation: mock
+ (Mock [Bit Text])
(def: (on_read [open? state])
(if open?
@@ -61,7 +59,7 @@
(def: #export echo
(-> Text (Console Promise))
(|>> [true]
- (console.mock ..simulation)
+ (console.mock ..mock)
console.async))
(def: #export test
@@ -73,7 +71,7 @@
[#let [console (..echo "")]
verdict (do (try.with promise.monad)
[_ (/.do! console profile)
- logging (!.use (\ console read_line) [])]
+ logging (\ console read_line [])]
(wrap (text\= (version.format language/lux.version)
logging)))]
(_.cover' [/.do!]