aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command/pom.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-06 21:34:21 -0400
committerEduardo Julian2021-07-06 21:34:21 -0400
commit2b909032e7a0bd10cd7db52067d2fb701bfa95e5 (patch)
tree0e2aaef228f80f3336715327f7f34065c309de22 /stdlib/source/test/aedifex/command/pom.lux
parent5cf4efa861075f8276f43a2516f5beacaf610b44 (diff)
Simplified the API for file-system operations.
Diffstat (limited to 'stdlib/source/test/aedifex/command/pom.lux')
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux37
1 files changed, 15 insertions, 22 deletions
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 0338bf7c4..2ac23ec7a 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -4,32 +4,30 @@
[abstract
[monad (#+ do)]]
[control
- ["." try (#+ Try) ("#\." functor)]
+ ["." try ("#\." functor)]
[concurrency
- ["." promise (#+ Promise)]]]
+ ["." promise]]]
[data
- ["." binary]
+ ["." binary ("#\." equivalence)]
["." text ("#\." equivalence)
[encoding
["." utf8]]]
[format
["." xml]]]
[math
- ["." random (#+ Random)]]
+ ["." random]]
[world
- ["." file (#+ File)]]]
+ ["." file]]]
[//
["@." version]
[//
["@." profile]]]
{#program
["." /
- ["/#" // #_
- ["#." clean]
- ["/#" // #_
- ["#" profile]
- ["#." action]
- ["#." pom]]]]})
+ ["//#" /// #_
+ ["#" profile]
+ ["#." action]
+ ["#." pom]]]})
(def: #export test
Test
@@ -41,27 +39,22 @@
[#let [console (@version.echo "")]
outcome (/.do! console fs sample)]
(case outcome
- (#try.Success path)
+ (#try.Success _)
(do !
[verdict (do ///action.monad
[expected (|> (///pom.write sample)
- (try\map (|>> (\ xml.codec encode) (\ utf8.codec encode)))
+ (try\map (|>> (\ xml.codec encode)
+ (\ utf8.codec encode)))
(\ ! wrap))
- file (: (Promise (Try (File Promise)))
- (file.get_file promise.monad fs path))
- actual (\ file content [])
+ actual (\ fs read ///pom.file)
logging! (\ ///action.monad map
(text\= /.success)
(\ console read_line []))
- #let [expected_path!
- (text\= ///pom.file path)
-
- expected_content!
- (\ binary.equivalence = expected actual)]]
+ #let [expected_content!
+ (binary\= expected actual)]]
(wrap (and logging!
- expected_path!
expected_content!)))]
(_.cover' [/.do! /.success]
(try.default false verdict)))