diff options
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r-- | stdlib/source/test/aedifex/artifact.lux | 9 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/deploy.lux | 14 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/deps.lux | 12 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/install.lux | 17 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/local.lux | 25 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/metadata.lux | 10 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/metadata/artifact.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/metadata/snapshot.lux | 14 |
8 files changed, 35 insertions, 70 deletions
diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index fc8bb2dae..5c694ae74 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -39,15 +39,6 @@ ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) - - (do random.monad - [sample ..random - #let [fs (: (file.System Promise) - (file.mock (\ file.default separator)))]] - (_.cover [/.uri /.path] - (|> (/.path fs sample) - (text.replace_all uri.separator (\ fs separator)) - (text\= (/.uri sample))))) /type.test /extension.test diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux index 45d39cffc..617b3386a 100644 --- a/stdlib/source/test/aedifex/command/deploy.lux +++ b/stdlib/source/test/aedifex/command/deploy.lux @@ -75,15 +75,11 @@ (-> (Program Promise) (Repository Promise) (file.System Promise) Artifact ///.Profile (Promise (Try Text))) - (do promise.monad - [home (\ program home [])] - (do ///action.monad - [#let [console (@version.echo "")] - _ (..make_sources! fs (get@ #///.sources profile)) - _ (: (Promise (Try Path)) - (file.make_directories promise.monad fs (///local.repository fs home))) - _ (/.do! console repository fs artifact profile)] - (!.use (\ console read_line) [])))) + (do ///action.monad + [#let [console (@version.echo "")] + _ (..make_sources! fs (get@ #///.sources profile)) + _ (/.do! console repository fs artifact profile)] + (!.use (\ console read_line) []))) (def: #export test Test diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index 08345a0cb..99856c83c 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -39,14 +39,15 @@ ["#." action] ["#." pom] ["#." package] - ["#." cache] ["#." artifact ["#/." type]] ["#." dependency ["#/." resolution] + ["#/." deployment] ["#/." status]] ["#." repository - ["#/." origin]]]]]}) + ["#/." origin] + ["#/." local]]]]]}) (def: #export test Test @@ -89,13 +90,14 @@ program (program.async (program.mock environment.empty home working_directory))]] (wrap (do promise.monad [verdict (do ///action.monad - [#let [console (@version.echo "")] + [#let [console (@version.echo "") + local (///repository/local.repository program fs)] pre (|> ///dependency/resolution.empty (dictionary.put dependee dependee_package) - (///cache.write_all program fs)) + (///dependency/deployment.all local)) post (|> (\ ///.monoid identity) (set@ #///.dependencies (set.from_list ///dependency.hash (list dependee depender))) - (/.do! program console fs (list (///repository.mock ($///dependency/resolution.single depender_artifact depender_package) [])))) + (/.do! console local (list (///repository.mock ($///dependency/resolution.single depender_artifact depender_package) [])))) logging! (\ ///action.monad map (text\= //clean.success) (!.use (\ console read_line) []))] diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux index 9df49efa4..ce3f21de8 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -26,7 +26,9 @@ ["." random (#+ Random)]] [world ["." file (#+ Path File)] - ["." program (#+ Program)]]] + ["." program (#+ Program)] + [net + ["." uri]]]] [// ["@." version] [// @@ -42,7 +44,9 @@ ["#." pom] ["#." local] ["#." artifact - ["#/." extension]]]]]}) + ["#/." extension]] + ["#." repository #_ + ["#/." local]]]]]}) (def: (make_sources! fs sources) (-> (file.System Promise) (Set Path) (Promise (Try Any))) @@ -68,9 +72,7 @@ (do ///action.monad [#let [console (@version.echo "")] _ (..make_sources! fs (get@ #///.sources sample)) - _ (: (Promise (Try Path)) - (file.make_directories promise.monad fs (///local.repository fs home))) - _ (/.do! program console fs sample)] + _ (/.do! console fs (///repository/local.repository program fs) sample)] (!.use (\ console read_line) [])))) (def: #export test @@ -88,9 +90,8 @@ program (program.async (program.mock environment.empty home working_directory))] verdict (do ///action.monad [logging (..execute! program fs sample) - #let [artifact_path (format (///local.path fs home identity) - (\ fs separator) - (///artifact.identity identity)) + #let [/ uri.separator + artifact_path (format (///local.uri identity) / (///artifact.identity identity)) library_path (format artifact_path ///artifact/extension.lux_library) pom_path (format artifact_path ///artifact/extension.pom)] diff --git a/stdlib/source/test/aedifex/local.lux b/stdlib/source/test/aedifex/local.lux index 7d0492815..6729d4485 100644 --- a/stdlib/source/test/aedifex/local.lux +++ b/stdlib/source/test/aedifex/local.lux @@ -3,35 +3,22 @@ ["_" test (#+ Test)] [abstract [monad (#+ do)]] - [control - [concurrency - [promise (#+ Promise)]]] [data ["." text]] [math - ["." random (#+ Random)]] - [world - ["." file]]] + ["." random (#+ Random)]]] [// ["@." artifact]] {#program - ["." / - ["/#" // #_ - ["#." artifact]]]}) + ["." /]}) (def: #export test Test (<| (_.covering /._) (do {! random.monad} - [sample @artifact.random - home (random.ascii/alpha 5) - #let [fs (: (file.System Promise) - (file.mock (\ file.default separator)))]] + [sample @artifact.random] ($_ _.and - (_.cover [/.repository /.path] - (let [path (/.path fs home sample)] - (and (text.starts_with? (/.repository fs home) - path) - (text.ends_with? (//artifact.path fs sample) - path)))) + (_.cover [/.repository /.uri] + (text.starts_with? /.repository + (/.uri sample))) )))) diff --git a/stdlib/source/test/aedifex/metadata.lux b/stdlib/source/test/aedifex/metadata.lux index 0cac022f8..33104330b 100644 --- a/stdlib/source/test/aedifex/metadata.lux +++ b/stdlib/source/test/aedifex/metadata.lux @@ -19,16 +19,6 @@ Test (<| (_.covering /._) ($_ _.and - (<| (_.for [/.file]) - (do random.monad - [sample @artifact.random] - ($_ _.and - (_.cover [/.project] - (text.ends_with? /.file (/.project sample))) - (_.cover [/.version] - (text.ends_with? /.file (/.version sample))) - ))) - /artifact.test /snapshot.test ))) diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index 6c39546b4..9977be8e1 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -60,9 +60,9 @@ ($equivalence.spec /.equivalence ..random)) (do random.monad [expected ..random] - (_.cover [/.write /.parser] + (_.cover [/.format /.parser] (|> expected - /.write + /.format (<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 c1725f55a..a2f0b65db 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -24,8 +24,8 @@ [macro ["." code]]] ["$." /// #_ - [artifact - ["#." type]]] + ["#." artifact + ["#/." type]]] {#program ["." /]}) @@ -55,15 +55,13 @@ ($_ random.and ..random_instant random.nat - (random.list 5 $///type.random) + (random.list 5 $///artifact/type.random) )) (def: #export random (Random /.Metadata) ($_ random.and - (random.ascii/alpha 5) - (random.ascii/alpha 5) - (random.ascii/alpha 5) + $///artifact.random ..random_versioning)) (def: #export test @@ -75,9 +73,9 @@ ($equivalence.spec /.equivalence ..random)) (do random.monad [expected ..random] - (_.cover [/.write /.parser] + (_.cover [/.format /.parser] (|> expected - /.write + /.format (<xml>.run /.parser) (try\map (\ /.equivalence = expected)) (try.default false)))) |