aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/extension.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-10-14 21:48:00 -0400
committerEduardo Julian2020-10-14 21:48:00 -0400
commit440608bc32916329c9f3c0f2bd9a8d1152ed5da8 (patch)
treee27ae0f41a437c24275293b151b23e63bf938392 /stdlib/source/test/aedifex/artifact/extension.lux
parent00d5ccbc043960037f644d4ff09b6a46fd0093d0 (diff)
Gave the Location type its own module.
Diffstat (limited to 'stdlib/source/test/aedifex/artifact/extension.lux')
-rw-r--r--stdlib/source/test/aedifex/artifact/extension.lux40
1 files changed, 40 insertions, 0 deletions
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]
+ )))))
+ ))))