diff options
author | Eduardo Julian | 2020-10-14 21:48:00 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-10-14 21:48:00 -0400 |
commit | 440608bc32916329c9f3c0f2bd9a8d1152ed5da8 (patch) | |
tree | e27ae0f41a437c24275293b151b23e63bf938392 /stdlib/source/test/aedifex/artifact | |
parent | 00d5ccbc043960037f644d4ff09b6a46fd0093d0 (diff) |
Gave the Location type its own module.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/aedifex/artifact.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/artifact/extension.lux | 40 |
2 files changed, 43 insertions, 1 deletions
diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index 72715fdef..376f26717 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -10,7 +10,8 @@ [math ["." random (#+ Random)]]] ["." / #_ - ["#." type]] + ["#." type] + ["#." extension]] {#program ["." /]}) @@ -31,4 +32,5 @@ ($equivalence.spec /.equivalence ..random)) /type.test + /extension.test )))) diff --git a/stdlib/source/test/aedifex/artifact/extension.lux b/stdlib/source/test/aedifex/artifact/extension.lux new file mode 100644 index 000000000..e65dd567a --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/extension.lux @@ -0,0 +1,40 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)]] + [data + ["." text ("#@." equivalence)] + [number + ["n" nat]] + [collection + ["." set] + ["." list]]] + [math + ["." random (#+ Random)]]] + {#program + ["." / + ["/#" // #_ + ["#" type]]]}) + +(def: #export test + Test + (<| (_.covering /._) + (_.with-cover [/.Extension] + ($_ _.and + (_.cover [/.lux-library /.jvm-library /.pom + /.sha1 /.md5] + (let [options (list /.lux-library /.jvm-library /.pom /.sha1 /.md5) + uniques (set.from-list text.hash options)] + (n.= (list.size options) + (set.size uniques)))) + (_.cover [/.extension] + (`` (and (~~ (template [<type> <extension>] + [(text@= <extension> + (/.extension <type>))] + + [//.lux-library /.lux-library] + [//.jvm-library /.jvm-library] + [//.pom /.pom] + ))))) + )))) |