aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/local.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-10-31 02:59:48 -0400
committerEduardo Julian2020-10-31 02:59:48 -0400
commiteea741e9b4a47ae09832311d6d61f0bd6024f673 (patch)
tree9d503f609c322c235811856ffa05232991b9c653 /stdlib/source/test/aedifex/local.lux
parentcb8f2b36352948108446c7e3b270faa97589bf7a (diff)
Easy to use Rev constants.
Diffstat (limited to 'stdlib/source/test/aedifex/local.lux')
-rw-r--r--stdlib/source/test/aedifex/local.lux36
1 files changed, 36 insertions, 0 deletions
diff --git a/stdlib/source/test/aedifex/local.lux b/stdlib/source/test/aedifex/local.lux
new file mode 100644
index 000000000..a883f565e
--- /dev/null
+++ b/stdlib/source/test/aedifex/local.lux
@@ -0,0 +1,36 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [control
+ [concurrency
+ [promise (#+ Promise)]]]
+ [data
+ ["." text]]
+ [math
+ ["." random (#+ Random)]]
+ [world
+ ["." file]]]
+ [//
+ ["@." artifact]]
+ {#program
+ ["." /
+ ["/#" // #_
+ ["#." artifact]]]})
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (do {@ random.monad}
+ [sample @artifact.random
+ #let [fs (: (file.System Promise)
+ (file.mock (:: file.default separator)))]]
+ ($_ _.and
+ (_.cover [/.repository /.path]
+ (let [path (/.path fs sample)]
+ (and (text.starts-with? (/.repository fs)
+ path)
+ (text.ends-with? (//artifact.path fs sample)
+ path))))
+ ))))