diff options
Diffstat (limited to 'stdlib/source/test/aedifex')
-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] + ))))) + )))) |