From 0d909187d5b9effcd08f533d50af7d29c0d6bfd8 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Apr 2022 05:42:36 -0400 Subject: De-sigil-ification: $ --- stdlib/source/test/aedifex/package.lux | 118 ++++++++++++++++----------------- 1 file changed, 59 insertions(+), 59 deletions(-) (limited to 'stdlib/source/test/aedifex/package.lux') diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux index af51453dd..28d763e4c 100644 --- a/stdlib/source/test/aedifex/package.lux +++ b/stdlib/source/test/aedifex/package.lux @@ -59,64 +59,64 @@ (_.for [/.Package]) (do [! random.monad] [[profile package] ..random] - ($_ _.and - (_.for [/.equivalence] - ($equivalence.spec /.equivalence (# ! each product.right ..random))) - - (_.cover [/.local?] - (/.local? (has /.#origin {//origin.#Local "~/yolo"} package))) - (_.cover [/.remote?] - (/.remote? (has /.#origin {//origin.#Remote "https://example.com"} package))) - (_.cover [/.local] - (let [expected_pom (|> package (the /.#pom) product.left) - expected_library (|> package (the /.#library) product.left) + (all _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence (# ! each product.right ..random))) + + (_.cover [/.local?] + (/.local? (has /.#origin {//origin.#Local "~/yolo"} package))) + (_.cover [/.remote?] + (/.remote? (has /.#origin {//origin.#Remote "https://example.com"} package))) + (_.cover [/.local] + (let [expected_pom (|> package (the /.#pom) product.left) + expected_library (|> package (the /.#library) product.left) - local (/.local expected_pom expected_library) + local (/.local expected_pom expected_library) - [actual_pom binary_pom pom_status] (the /.#pom local) - [actual_library library_status] (the /.#library local)] - (and (case (the /.#origin local) - {//origin.#Local ""} true - _ false) - (let [expected_sha1 (//hash.sha-1 expected_library) - expected_md5 (//hash.md5 expected_library)] - (and (same? expected_library actual_library) - (case library_status - {//status.#Verified actual_sha1 expected_md5} - (and (//hash#= expected_sha1 actual_sha1) - (//hash#= expected_md5 expected_md5)) - - _ - false))) - (let [expected_sha1 (//hash.sha-1 binary_pom) - expected_md5 (//hash.md5 binary_pom)] - (and (same? expected_pom actual_pom) - (|> (do try.monad - [xml_pom (# utf8.codec decoded binary_pom) - decoded_pom (# xml.codec decoded xml_pom)] - (in (# xml.equivalence = actual_pom decoded_pom))) - (try.else false)) - (case pom_status - {//status.#Verified actual_sha1 expected_md5} - (and (//hash#= expected_sha1 actual_sha1) - (//hash#= expected_md5 expected_md5)) - - _ - false)))))) - (_.cover [/.dependencies] - (let [expected (the //.#dependencies profile)] - (case (/.dependencies package) - {try.#Success actual} - (# set.equivalence = expected actual) - - {try.#Failure error} - false))) - (_.cover [/.repositories] - (let [expected (the //.#repositories profile)] - (case (/.repositories package) - {try.#Success actual} - (# set.equivalence = expected actual) - - {try.#Failure error} - false))) - )))) + [actual_pom binary_pom pom_status] (the /.#pom local) + [actual_library library_status] (the /.#library local)] + (and (case (the /.#origin local) + {//origin.#Local ""} true + _ false) + (let [expected_sha1 (//hash.sha-1 expected_library) + expected_md5 (//hash.md5 expected_library)] + (and (same? expected_library actual_library) + (case library_status + {//status.#Verified actual_sha1 expected_md5} + (and (//hash#= expected_sha1 actual_sha1) + (//hash#= expected_md5 expected_md5)) + + _ + false))) + (let [expected_sha1 (//hash.sha-1 binary_pom) + expected_md5 (//hash.md5 binary_pom)] + (and (same? expected_pom actual_pom) + (|> (do try.monad + [xml_pom (# utf8.codec decoded binary_pom) + decoded_pom (# xml.codec decoded xml_pom)] + (in (# xml.equivalence = actual_pom decoded_pom))) + (try.else false)) + (case pom_status + {//status.#Verified actual_sha1 expected_md5} + (and (//hash#= expected_sha1 actual_sha1) + (//hash#= expected_md5 expected_md5)) + + _ + false)))))) + (_.cover [/.dependencies] + (let [expected (the //.#dependencies profile)] + (case (/.dependencies package) + {try.#Success actual} + (# set.equivalence = expected actual) + + {try.#Failure error} + false))) + (_.cover [/.repositories] + (let [expected (the //.#repositories profile)] + (case (/.repositories package) + {try.#Success actual} + (# set.equivalence = expected actual) + + {try.#Failure error} + false))) + )))) -- cgit v1.2.3