aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/cache.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-10 22:29:32 -0400
committerEduardo Julian2020-12-10 22:29:32 -0400
commit9af671a34728b35c48bff2ba163c371dc5084946 (patch)
treeec35f32b8f0cabec702708e0e3cc4462b587c752 /stdlib/source/test/aedifex/cache.lux
parentd747aada2d6df6538d0a88d70169f3757aef50af (diff)
Render XML to text in an indented form for human readability.
Diffstat (limited to 'stdlib/source/test/aedifex/cache.lux')
-rw-r--r--stdlib/source/test/aedifex/cache.lux25
1 files changed, 17 insertions, 8 deletions
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index 7923eb8c5..0bb0aea68 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -6,7 +6,9 @@
[control
["." try]
[concurrency
- ["." promise (#+ Promise)]]]
+ ["." promise (#+ Promise)]]
+ [parser
+ ["." environment]]]
[data
[binary (#+ Binary)]
["." text]
@@ -20,7 +22,8 @@
[math
["." random (#+ Random) ("#\." monad)]]
[world
- ["." file]]]
+ ["." file]
+ ["." program]]]
[//
["@." profile]
["@." artifact]
@@ -96,11 +99,14 @@
Test
(do {! random.monad}
[[dependency expected-package] ..package
+ home (random.ascii/alpha 5)
+ working-directory (random.ascii/alpha 5)
#let [fs (: (file.System Promise)
- (file.mock (\ file.default separator)))]]
+ (file.mock (\ file.default separator)))
+ program (program.async (program.mock environment.empty home working-directory))]]
(wrap (do promise.monad
- [wrote! (/.write-one fs dependency expected-package)
- read! (/.read-one fs dependency)]
+ [wrote! (/.write-one program fs dependency expected-package)
+ read! (/.read-one program fs dependency)]
(_.cover' [/.write-one /.read-one]
(<| (try.default false)
(do try.monad
@@ -114,11 +120,14 @@
Test
(do {! random.monad}
[expected ..resolution
+ home (random.ascii/alpha 5)
+ working-directory (random.ascii/alpha 5)
#let [fs (: (file.System Promise)
- (file.mock (\ file.default separator)))]]
+ (file.mock (\ file.default separator)))
+ program (program.async (program.mock environment.empty home working-directory))]]
(wrap (do promise.monad
- [wrote! (/.write-all fs expected)
- read! (/.read-all fs (dictionary.keys expected) //dependency/resolution.empty)]
+ [wrote! (/.write-all program fs expected)
+ read! (/.read-all program fs (dictionary.keys expected) //dependency/resolution.empty)]
(_.cover' [/.write-all /.read-all]
(<| (try.default false)
(do try.monad