diff options
author | Eduardo Julian | 2021-06-14 18:33:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-06-14 18:33:54 -0400 |
commit | 519c0c0c71cdf7ce3dfc64b9781ab826760b3d94 (patch) | |
tree | 75fa0672afceff129e5e75afb7a5fed197ce1773 /stdlib/source/test/aedifex | |
parent | af3e6e2cb011dc2ad9204440990731a2f272716d (diff) |
Extracted Licentia out of the standard library.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/aedifex.lux | 83 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command.lux | 32 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/install.lux | 20 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/pom.lux | 5 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/command/version.lux | 4 |
5 files changed, 80 insertions, 64 deletions
diff --git a/stdlib/source/test/aedifex.lux b/stdlib/source/test/aedifex.lux index 3833c0828..ae9bde67c 100644 --- a/stdlib/source/test/aedifex.lux +++ b/stdlib/source/test/aedifex.lux @@ -1,66 +1,49 @@ (.module: [lux #* + [program (#+ program:)] ["_" test (#+ Test)] [control - [io (#+ io)] - [parser - [cli (#+ program:)]]]] + [io (#+ io)]]] ["." / #_ ["#." artifact] - ["#." input] - ["#." command #_ - ["#/." version] - ["#/." clean] - ["#/." pom] - ["#/." install] - ["#/." deploy] - ["#/." deps] - ["#/." build] - ["#/." test] - ["#/." auto]] - ["#." local] - ["#." dependency - ["#/." resolution] - ["#/." status]] - ["#." package] - ["#." profile] - ["#." project] ["#." cli] - ["#." hash] - ["#." parser] - ["#." pom] - ["#." repository] - ["#." runtime] - ["#." metadata]]) + ["#." command] + ## ["#." input] + ## ["#." local] + ## ["#." dependency + ## ## ["#/." resolution] + ## ["#/." status]] + ## ["#." package] + ## ["#." profile] + ## ["#." project] + ## ["#." hash] + ## ["#." parser] + ## ["#." pom] + ## ["#." repository] + ## ["#." runtime] + ## ["#." metadata] + ]) (def: test Test ($_ _.and /artifact.test - /input.test - /command/version.test - /command/clean.test - /command/pom.test - /command/install.test - /command/deploy.test - /command/deps.test - /command/build.test - /command/test.test - /command/auto.test - /local.test - /dependency.test - /dependency/resolution.test - /dependency/status.test - /package.test - /profile.test - /project.test /cli.test - /hash.test - /parser.test - /pom.test - /repository.test - /runtime.test - /metadata.test + /command.test + ## /input.test + ## /local.test + ## /dependency.test + ## ## /dependency/resolution.test + ## /dependency/status.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.lux b/stdlib/source/test/aedifex/command.lux new file mode 100644 index 000000000..0ef18f044 --- /dev/null +++ b/stdlib/source/test/aedifex/command.lux @@ -0,0 +1,32 @@ +(.module: + [lux #* + ["_" test (#+ Test)]] + ["." / #_ + ["#." clean] + ["#." install] + ["#." pom] + ["#." version]] + {#program + ["." / + ## ["#." deploy] + ## ["#." deps] + ## ["#." build] + ## ["#." test] + ## ["#." auto] + ]}) + +(def: #export test + Test + (<| (_.covering /._) + (_.for [/.Command]) + ($_ _.and + /clean.test + /install.test + /pom.test + /version.test + ## /deploy.test + ## /deps.test + ## /build.test + ## /test.test + ## /auto.test + ))) diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux index ce3f21de8..33ee7192d 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -16,8 +16,7 @@ ["." maybe] ["." binary] ["." text ("#\." equivalence) - ["%" format (#+ format)] - ["." encoding]] + ["%" format (#+ format)]] [format ["." xml]] [collection @@ -67,13 +66,11 @@ (def: (execute! program fs sample) (-> (Program Promise) (file.System Promise) ///.Profile (Promise (Try Text))) - (do promise.monad - [home (\ program home [])] - (do ///action.monad - [#let [console (@version.echo "")] - _ (..make_sources! fs (get@ #///.sources sample)) - _ (/.do! console fs (///repository/local.repository program fs) sample)] - (!.use (\ console read_line) [])))) + (do ///action.monad + [#let [console (@version.echo "")] + _ (..make_sources! fs (get@ #///.sources sample)) + _ (/.do! console fs (///repository/local.repository program fs) sample)] + (!.use (\ console read_line) []))) (def: #export test Test @@ -91,17 +88,18 @@ verdict (do ///action.monad [logging (..execute! program fs sample) #let [/ uri.separator - artifact_path (format (///local.uri identity) / (///artifact.identity identity)) + artifact_path (///local.uri (get@ #///artifact.version identity) identity) library_path (format artifact_path ///artifact/extension.lux_library) pom_path (format artifact_path ///artifact/extension.pom)] + #let [succeeded! (text\= //clean.success logging)] library_exists! (\ promise.monad map exception.return (file.file_exists? promise.monad fs library_path)) pom_exists! (\ promise.monad map exception.return (file.file_exists? promise.monad fs pom_path))] - (wrap (and (text\= //clean.success logging) + (wrap (and succeeded! library_exists! pom_exists!)))] (_.cover' [/.do!] diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux index 33c102926..c368d5f84 100644 --- a/stdlib/source/test/aedifex/command/pom.lux +++ b/stdlib/source/test/aedifex/command/pom.lux @@ -12,7 +12,8 @@ [data ["." binary] ["." text ("#\." equivalence) - ["." encoding]] + [encoding + ["." utf8]]] [format ["." xml]]] [math @@ -46,7 +47,7 @@ (do ! [verdict (do ///action.monad [expected (|> (///pom.write sample) - (try\map (|>> (\ xml.codec encode) (\ encoding.utf8 encode))) + (try\map (|>> (\ xml.codec encode) (\ utf8.codec encode))) (\ ! wrap)) file (: (Promise (Try (File Promise))) (file.get_file promise.monad fs path)) diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux index ee26b3b5d..c7a9aa4ef 100644 --- a/stdlib/source/test/aedifex/command/version.lux +++ b/stdlib/source/test/aedifex/command/version.lux @@ -60,7 +60,9 @@ (def: #export echo (-> Text (Console Promise)) - (|>> [true] (console.mock ..simulation))) + (|>> [true] + (console.mock ..simulation) + console.async)) (def: #export test Test |