aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2021-06-26 00:56:43 -0400
committerEduardo Julian2021-06-26 00:56:43 -0400
commitb80f79ae6b2e240949ebd709a253e21f7caf7ed3 (patch)
tree0347461baa5544b0afa65fe260d7f804ff238c97 /stdlib/source/test/aedifex
parentce1a7a131f7c4df8eae5c019eba2893b56f04d46 (diff)
Delegate text (lower|upper)-casing to the host-platform implementations.
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r--stdlib/source/test/aedifex/command/test.lux8
-rw-r--r--stdlib/source/test/aedifex/local.lux6
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux7
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux31
4 files changed, 32 insertions, 20 deletions
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index 36c21b520..6b7ba9324 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -44,7 +44,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [program (random.ascii/alpha 5)
+ [test (random.ascii/alpha 5)
target (random.ascii/alpha 5)
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
@@ -52,11 +52,11 @@
(\ ///.monoid identity))
with_target (: (-> Profile Profile)
(set@ #///.target (#.Some target)))
- with_program (: (-> Profile Profile)
- (set@ #///.program (#.Some program)))
+ with_test (: (-> Profile Profile)
+ (set@ #///.test (#.Some test)))
profile (|> empty_profile
- with_program
+ with_test
with_target)]
resolution @build.resolution]
($_ _.and
diff --git a/stdlib/source/test/aedifex/local.lux b/stdlib/source/test/aedifex/local.lux
index 6729d4485..3f6574ed9 100644
--- a/stdlib/source/test/aedifex/local.lux
+++ b/stdlib/source/test/aedifex/local.lux
@@ -10,7 +10,9 @@
[//
["@." artifact]]
{#program
- ["." /]})
+ ["." /
+ ["/#" // #_
+ ["#." artifact]]]})
(def: #export test
Test
@@ -20,5 +22,5 @@
($_ _.and
(_.cover [/.repository /.uri]
(text.starts_with? /.repository
- (/.uri sample)))
+ (/.uri (get@ #//artifact.version sample) sample)))
))))
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index 9977be8e1..6c3e509b1 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -33,9 +33,9 @@
(random.ascii/alpha 5)
(random.list 5 (random.ascii/alpha 5))
(do {! random.monad}
- [year (\ ! map (|>> (n.% 10,000) .int) random.nat)
- month (\ ! map (n.% 13) random.nat)
- day_of_month (\ ! map (n.% 29) random.nat)
+ [year (\ ! map (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
+ month (\ ! map (|>> (n.% 12) (n.+ 1)) random.nat)
+ day_of_month (\ ! map (|>> (n.% 28) (n.+ 1)) random.nat)
hour (\ ! map (n.% 24) random.nat)
minute (\ ! map (n.% 60) random.nat)
second (\ ! map (n.% 60) random.nat)]
@@ -63,6 +63,7 @@
(_.cover [/.format /.parser]
(|> expected
/.format
+ list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
(try.default false))))
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index a2f0b65db..1858cae25 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -20,21 +20,28 @@
["." instant (#+ Instant)]
["." duration]]
[math
- ["." random (#+ Random)]]
+ ["." random (#+ Random) ("#\." monad)]]
[macro
["." code]]]
["$." /// #_
["#." artifact
- ["#/." type]]]
+ ["#/." type]
+ ["#/." time]
+ ["#/." snapshot #_
+ ["#/." version]]]]
{#program
- ["." /]})
+ ["." /
+ [///
+ [artifact
+ [versioning (#+ Versioning)]
+ ["#." snapshot]]]]})
(def: random_instant
(Random Instant)
(do {! random.monad}
- [year (\ ! map (|>> (n.% 10,000) .int) random.nat)
- month (\ ! map (n.% 13) random.nat)
- day_of_month (\ ! map (n.% 29) random.nat)
+ [year (\ ! map (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
+ month (\ ! map (|>> (n.% 12) (n.+ 1)) random.nat)
+ day_of_month (\ ! map (|>> (n.% 28) (n.+ 1)) random.nat)
hour (\ ! map (n.% 24) random.nat)
minute (\ ! map (n.% 60) random.nat)
second (\ ! map (n.% 60) random.nat)]
@@ -51,18 +58,19 @@
(wrap (instant.from_date_time date time)))))))
(def: random_versioning
- (Random /.Versioning)
+ (Random Versioning)
($_ random.and
- ..random_instant
- random.nat
- (random.list 5 $///artifact/type.random)
+ (random\wrap #/snapshot.Local)
+ $///artifact/time.random
+ (random.list 5 $///artifact/snapshot/version.random)
))
(def: #export random
(Random /.Metadata)
($_ random.and
$///artifact.random
- ..random_versioning))
+ ..random_versioning
+ ))
(def: #export test
Test
@@ -76,6 +84,7 @@
(_.cover [/.format /.parser]
(|> expected
/.format
+ list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
(try.default false))))