aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2020-10-24 09:08:00 -0400
committerEduardo Julian2020-10-24 09:08:00 -0400
commit0ebabc6e307d161ac4ef837aa492066d4320f6a9 (patch)
tree96e685c95eb4c99c6e6347521c35b70ad23d172e /stdlib/source/test/aedifex
parentbcd68d4691e7b2f6d56e0ab92b591c14d7a26a48 (diff)
Re-named some list functions.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex.lux4
-rw-r--r--stdlib/source/test/aedifex/pom.lux48
2 files changed, 51 insertions, 1 deletions
diff --git a/stdlib/source/test/aedifex.lux b/stdlib/source/test/aedifex.lux
index b5aa7e34e..f4abc3887 100644
--- a/stdlib/source/test/aedifex.lux
+++ b/stdlib/source/test/aedifex.lux
@@ -12,7 +12,8 @@
["#." project]
["#." cli]
["#." hash]
- ["#." parser]])
+ ["#." parser]
+ ["#." pom]])
(def: test
Test
@@ -24,6 +25,7 @@
/cli.test
/hash.test
/parser.test
+ /pom.test
))
(program: args
diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux
new file mode 100644
index 000000000..d1f278da7
--- /dev/null
+++ b/stdlib/source/test/aedifex/pom.lux
@@ -0,0 +1,48 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [control
+ ["." try]
+ ["." exception]
+ ["<>" parser
+ ["<.>" xml]]]
+ [data
+ [format
+ ["." xml]]]
+ [math
+ ["." random]]]
+ [//
+ ["@." profile]]
+ {#program
+ ["." /
+ ["/#" // #_
+ ["#" profile]]]})
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (do random.monad
+ [expected @profile.random]
+ (_.cover [/.write /.parser]
+ (case [(/.write expected)
+ (get@ #//.identity expected)]
+ [(#try.Success pom)
+ (#.Some _)]
+ (case (<xml>.run /.parser pom)
+ (#try.Success actual)
+ (:: //.equivalence =
+ (|> (:: //.monoid identity)
+ (set@ #//.dependencies (get@ #//.dependencies expected)))
+ actual)
+
+ (#try.Failure error)
+ false)
+
+ [(#try.Failure error)
+ #.None]
+ (exception.match? //.no-identity error)
+
+ _
+ false)))))