diff options
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r-- | stdlib/source/test/aedifex/command/deps.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/input.lux | 16 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/runtime.lux | 28 |
3 files changed, 43 insertions, 5 deletions
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index c0617188d..ce85a2206 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -82,7 +82,7 @@ (/.do! fs (list (///repository.mock ($///dependency/resolution.single depender-artifact depender-package) []))))] (wrap (and (and (set.member? pre dependee-artifact) (not (set.member? pre depender-artifact))) - (and (not (set.member? post dependee-artifact)) - (set.member? post depender-artifact)))))] + (and (dictionary.contains? dependee post) + (dictionary.contains? depender post)))))] (_.claim [/.do!] (try.default false verdict))))))) diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux index c25d6fe36..c7f6a4282 100644 --- a/stdlib/source/test/aedifex/input.lux +++ b/stdlib/source/test/aedifex/input.lux @@ -12,8 +12,10 @@ [data ["." binary] ["." text - ["%" format] - ["." encoding]]] + ["%" format (#+ format)] + ["." encoding]] + [collection + ["." set (#+ Set)]]] [math ["." random (#+ Random)]] [world @@ -28,6 +30,12 @@ ["#." action] ["#." format]]]}) +(def: (with-default-source sources) + (-> (Set //.Source) (Set //.Source)) + (if (set.empty? sources) + (set.add //.default-source sources) + sources)) + (def: #export test Test (<| (_.covering /._) @@ -46,6 +54,8 @@ (!.use (:: file over-write))) actual (: (Promise (Try Profile)) (/.read promise.monad fs //.default))] - (wrap (:: //.equivalence = expected actual)))] + (wrap (:: //.equivalence = + (update@ #//.sources ..with-default-source expected) + actual)))] (_.claim [/.read] (try.default false verdict))))))) diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux new file mode 100644 index 000000000..e1c0a77c1 --- /dev/null +++ b/stdlib/source/test/aedifex/runtime.lux @@ -0,0 +1,28 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)]] + [data + ["." text]] + [math + ["." random]]] + {#program + ["." /]}) + +(def: #export test + Test + (<| (_.covering /._) + (do random.monad + [path (random.ascii/alpha 5)] + (`` ($_ _.and + (~~ (template [<command>] + [(_.cover [<command>] + (let [command (<command> path)] + (and (text.starts-with? (<command> "") command) + (text.ends-with? path command))))] + + [/.java] + [/.node] + )) + ))))) |