From 4ca397765805eda5ddee393901ed3a02001a960a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 25 Dec 2020 09:22:38 -0400 Subject: Replaced kebab-case with snake_case for naming convention. --- stdlib/source/test/aedifex/command/deploy.lux | 68 +++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'stdlib/source/test/aedifex/command/deploy.lux') diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux index 86f3e0dbb..b6cd89469 100644 --- a/stdlib/source/test/aedifex/command/deploy.lux +++ b/stdlib/source/test/aedifex/command/deploy.lux @@ -53,9 +53,9 @@ ["#." artifact (#+ Artifact) ["#/." extension]]]]]}) -(def: (make-sources! fs sources) +(def: (make_sources! fs sources) (-> (file.System Promise) (Set Path) (Promise (Try Any))) - (loop [sources (set.to-list sources)] + (loop [sources (set.to_list sources)] (case sources #.Nil (|> [] @@ -65,9 +65,9 @@ (#.Cons head tail) (do (try.with promise.monad) [_ (: (Promise (Try Path)) - (file.make-directories promise.monad fs head)) + (file.make_directories promise.monad fs head)) _ (: (Promise (Try (File Promise))) - (file.get-file promise.monad fs (format head (\ fs separator) head ".lux")))] + (file.get_file promise.monad fs (format head (\ fs separator) head ".lux")))] (recur tail))))) (def: (execute! program repository fs artifact profile) @@ -78,67 +78,67 @@ [home (\ program home [])] (do ///action.monad [#let [console (@version.echo "")] - _ (..make-sources! fs (get@ #///.sources profile)) + _ (..make_sources! fs (get@ #///.sources profile)) _ (: (Promise (Try Path)) - (file.make-directories promise.monad fs (///local.repository fs home))) + (file.make_directories promise.monad fs (///local.repository fs home))) _ (/.do! console repository fs artifact profile)] - (!.use (\ console read-line) [])))) + (!.use (\ console read_line) [])))) (def: #export test Test (<| (_.covering /._) (do {! random.monad} - [[artifact expected-pom profile] + [[artifact expected_pom profile] (random.one (function (_ profile) (do maybe.monad [artifact (get@ #///.identity profile) - expected-pom (try.to-maybe (///pom.write profile))] - (wrap [artifact expected-pom profile]))) + expected_pom (try.to_maybe (///pom.write profile))] + (wrap [artifact expected_pom profile]))) @profile.random) home (random.ascii/alpha 5) - working-directory (random.ascii/alpha 5) + working_directory (random.ascii/alpha 5) #let [repository (///repository.mock @repository.simulation @repository.empty) fs (file.mock (\ file.default separator)) - program (program.async (program.mock environment.empty home working-directory))]] + program (program.async (program.mock environment.empty home working_directory))]] (wrap (do {! promise.monad} [verdict (do {! ///action.monad} [logging (..execute! program repository fs artifact profile) - expected-library (|> profile + expected_library (|> profile (get@ #///.sources) - set.to-list + set.to_list (export.library fs) (\ ! map (format.run tar.writer))) - actual-pom (\ repository download (///repository.uri artifact ///artifact/extension.pom)) - actual-library (\ repository download (///repository.uri artifact ///artifact/extension.lux-library)) - actual-sha-1 (\ repository download (///repository.uri artifact (format ///artifact/extension.lux-library ///artifact/extension.sha-1))) - actual-md5 (\ repository download (///repository.uri artifact (format ///artifact/extension.lux-library ///artifact/extension.md5))) + actual_pom (\ repository download (///repository.uri artifact ///artifact/extension.pom)) + actual_library (\ repository download (///repository.uri artifact ///artifact/extension.lux_library)) + actual_sha-1 (\ repository download (///repository.uri artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1))) + actual_md5 (\ repository download (///repository.uri artifact (format ///artifact/extension.lux_library ///artifact/extension.md5))) - #let [deployed-library! + #let [deployed_library! (\ binary.equivalence = - expected-library - actual-library) + expected_library + actual_library) - deployed-pom! + deployed_pom! (\ binary.equivalence = - (|> expected-pom (\ xml.codec encode) (\ encoding.utf8 encode)) - actual-pom) + (|> expected_pom (\ xml.codec encode) (\ encoding.utf8 encode)) + actual_pom) - deployed-sha-1! + deployed_sha-1! (\ binary.equivalence = - (///hash.data (///hash.sha-1 expected-library)) - actual-sha-1) + (///hash.data (///hash.sha-1 expected_library)) + actual_sha-1) - deployed-md5! + deployed_md5! (\ binary.equivalence = - (///hash.data (///hash.md5 expected-library)) - actual-md5)]] + (///hash.data (///hash.md5 expected_library)) + actual_md5)]] (wrap (and (text\= //clean.success logging) - deployed-library! - deployed-pom! - deployed-sha-1! - deployed-md5!)))] + deployed_library! + deployed_pom! + deployed_sha-1! + deployed_md5!)))] (_.cover' [/.do!] (try.default false verdict))))))) -- cgit v1.2.3