aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command
diff options
context:
space:
mode:
authorEduardo Julian2021-06-14 18:33:54 -0400
committerEduardo Julian2021-06-14 18:33:54 -0400
commit519c0c0c71cdf7ce3dfc64b9781ab826760b3d94 (patch)
tree75fa0672afceff129e5e75afb7a5fed197ce1773 /stdlib/source/test/aedifex/command
parentaf3e6e2cb011dc2ad9204440990731a2f272716d (diff)
Extracted Licentia out of the standard library.
Diffstat (limited to 'stdlib/source/test/aedifex/command')
-rw-r--r--stdlib/source/test/aedifex/command/install.lux20
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux5
-rw-r--r--stdlib/source/test/aedifex/command/version.lux4
3 files changed, 15 insertions, 14 deletions
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index ce3f21de8..33ee7192d 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -16,8 +16,7 @@
["." maybe]
["." binary]
["." text ("#\." equivalence)
- ["%" format (#+ format)]
- ["." encoding]]
+ ["%" format (#+ format)]]
[format
["." xml]]
[collection
@@ -67,13 +66,11 @@
(def: (execute! program fs sample)
(-> (Program Promise) (file.System Promise) ///.Profile (Promise (Try Text)))
- (do promise.monad
- [home (\ program home [])]
- (do ///action.monad
- [#let [console (@version.echo "")]
- _ (..make_sources! fs (get@ #///.sources sample))
- _ (/.do! console fs (///repository/local.repository program fs) sample)]
- (!.use (\ console read_line) []))))
+ (do ///action.monad
+ [#let [console (@version.echo "")]
+ _ (..make_sources! fs (get@ #///.sources sample))
+ _ (/.do! console fs (///repository/local.repository program fs) sample)]
+ (!.use (\ console read_line) [])))
(def: #export test
Test
@@ -91,17 +88,18 @@
verdict (do ///action.monad
[logging (..execute! program fs sample)
#let [/ uri.separator
- artifact_path (format (///local.uri identity) / (///artifact.identity identity))
+ artifact_path (///local.uri (get@ #///artifact.version identity) identity)
library_path (format artifact_path ///artifact/extension.lux_library)
pom_path (format artifact_path ///artifact/extension.pom)]
+ #let [succeeded! (text\= //clean.success logging)]
library_exists! (\ promise.monad map
exception.return
(file.file_exists? promise.monad fs library_path))
pom_exists! (\ promise.monad map
exception.return
(file.file_exists? promise.monad fs pom_path))]
- (wrap (and (text\= //clean.success logging)
+ (wrap (and succeeded!
library_exists!
pom_exists!)))]
(_.cover' [/.do!]
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 33c102926..c368d5f84 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -12,7 +12,8 @@
[data
["." binary]
["." text ("#\." equivalence)
- ["." encoding]]
+ [encoding
+ ["." utf8]]]
[format
["." xml]]]
[math
@@ -46,7 +47,7 @@
(do !
[verdict (do ///action.monad
[expected (|> (///pom.write sample)
- (try\map (|>> (\ xml.codec encode) (\ encoding.utf8 encode)))
+ (try\map (|>> (\ xml.codec encode) (\ utf8.codec encode)))
(\ ! wrap))
file (: (Promise (Try (File Promise)))
(file.get_file promise.monad fs path))
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
index ee26b3b5d..c7a9aa4ef 100644
--- a/stdlib/source/test/aedifex/command/version.lux
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -60,7 +60,9 @@
(def: #export echo
(-> Text (Console Promise))
- (|>> [true] (console.mock ..simulation)))
+ (|>> [true]
+ (console.mock ..simulation)
+ console.async))
(def: #export test
Test