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 '')
-rw-r--r--stdlib/source/test/aedifex.lux35
-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
5 files changed, 53 insertions, 34 deletions
diff --git a/stdlib/source/test/aedifex.lux b/stdlib/source/test/aedifex.lux
index ae9bde67c..b7d0d29d9 100644
--- a/stdlib/source/test/aedifex.lux
+++ b/stdlib/source/test/aedifex.lux
@@ -8,42 +8,49 @@
["#." artifact]
["#." cli]
["#." command]
- ## ["#." input]
- ## ["#." local]
- ## ["#." dependency
- ## ## ["#/." resolution]
- ## ["#/." status]]
+ ["#." dependency
+ ["#/." resolution]
+ ["#/." status]]
+ ["#." hash]
+ ["#." input]
+ ["#." local]
+ ["#." metadata]
## ["#." package]
## ["#." profile]
## ["#." project]
- ## ["#." hash]
## ["#." parser]
## ["#." pom]
## ["#." repository]
## ["#." runtime]
- ## ["#." metadata]
])
+(def: dependency
+ Test
+ ($_ _.and
+ /dependency.test
+ /dependency/resolution.test
+ /dependency/status.test
+ ))
+
(def: test
Test
($_ _.and
/artifact.test
/cli.test
/command.test
- ## /input.test
- ## /local.test
- ## /dependency.test
- ## ## /dependency/resolution.test
- ## /dependency/status.test
+ ..dependency
+ /hash.test
+ /input.test
+ /local.test
+ /metadata.test
+
## /package.test
## /profile.test
## /project.test
- ## /hash.test
## /parser.test
## /pom.test
## /repository.test
## /runtime.test
- ## /metadata.test
))
(program: args
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))))