aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/dependency/resolution.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/aedifex/dependency/resolution.lux')
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux168
1 files changed, 84 insertions, 84 deletions
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 69867d5f8..b8b50f23d 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -53,8 +53,8 @@
(do [! random.monad]
[artifact $///artifact.random
[_ package] $///package.random]
- (in (dictionary.has [#///dependency.artifact artifact
- #///dependency.type ///artifact/type.lux_library]
+ (in (dictionary.has [///dependency.#artifact artifact
+ ///dependency.#type ///artifact/type.lux_library]
package
/.empty))))
@@ -92,13 +92,13 @@
(def: the_description
"[0]")
(def: (on_download uri state)
- {#try.Failure "NOPE"})
+ {try.#Failure "NOPE"})
(def: (on_upload uri binary state)
- {#try.Failure "NOPE"})))
+ {try.#Failure "NOPE"})))
(def: .public (single artifact package)
(-> Artifact Package (Mock Any))
- (let [expected (///artifact.uri (value@ #///artifact.version artifact) artifact)]
+ (let [expected (///artifact.uri (value@ ///artifact.#version artifact) artifact)]
(implementation
(def: the_description
"[1]")
@@ -106,37 +106,37 @@
(if (text.contains? expected uri)
(let [library (: Binary
(|> package
- (value@ #///package.library)
+ (value@ ///package.#library)
product.left))
pom (: Binary
(|> package
- (value@ #///package.pom)
+ (value@ ///package.#pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)))]
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- {#try.Success [state library]}
+ {try.#Success [state library]}
(text.ends_with? ..lux_sha-1 uri)
- {#try.Success [state (..sha-1 library)]}
+ {try.#Success [state (..sha-1 library)]}
(text.ends_with? ..lux_md5 uri)
- {#try.Success [state (..md5 library)]}
+ {try.#Success [state (..md5 library)]}
(text.ends_with? ///artifact/extension.pom uri)
- {#try.Success [state pom]}
+ {try.#Success [state pom]}
(text.ends_with? ..pom_sha-1 uri)
- {#try.Success [state (..sha-1 pom)]}
+ {try.#Success [state (..sha-1 pom)]}
(text.ends_with? ..pom_md5 uri)
- {#try.Success [state (..md5 pom)]}
+ {try.#Success [state (..md5 pom)]}
... else
- {#try.Failure "NOPE"}))
- {#try.Failure "NOPE"}))
+ {try.#Failure "NOPE"}))
+ {try.#Failure "NOPE"}))
(def: (on_upload uri binary state)
- {#try.Failure "NOPE"}))))
+ {try.#Failure "NOPE"}))))
(def: (bad_sha-1 expected_artifact expected_package dummy_package)
(-> Artifact Package Package (Mock Any))
@@ -144,52 +144,52 @@
(def: the_description
"[~SHA-1]")
(def: (on_download uri state)
- (if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
+ (if (text.contains? (///artifact.uri (value@ ///artifact.#version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.library)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#library)
product.left)]}
(text.ends_with? ..lux_sha-1 uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.library)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#library)
product.left
..sha-1)]}
(text.ends_with? ..lux_md5 uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.library)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#library)
product.left
..md5)]}
(text.ends_with? ///artifact/extension.pom uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.pom)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded))]}
(text.ends_with? ..pom_sha-1 uri)
- {#try.Success [state (|> dummy_package
- (value@ #///package.pom)
+ {try.#Success [state (|> dummy_package
+ (value@ ///package.#pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
..sha-1)]}
(text.ends_with? ..pom_md5 uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.pom)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
..md5)]}
... else
- {#try.Failure "NOPE"})
- {#try.Failure "NOPE"}))
+ {try.#Failure "NOPE"})
+ {try.#Failure "NOPE"}))
(def: (on_upload uri binary state)
- {#try.Failure "NOPE"})))
+ {try.#Failure "NOPE"})))
(def: (bad_md5 expected_artifact expected_package dummy_package)
(-> Artifact Package Package (Mock Any))
@@ -197,52 +197,52 @@
(def: the_description
"[~MD5]")
(def: (on_download uri state)
- (if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
+ (if (text.contains? (///artifact.uri (value@ ///artifact.#version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.library)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#library)
product.left)]}
(text.ends_with? ..lux_sha-1 uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.library)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#library)
product.left
..sha-1)]}
(text.ends_with? ..lux_md5 uri)
- {#try.Success [state (|> dummy_package
- (value@ #///package.library)
+ {try.#Success [state (|> dummy_package
+ (value@ ///package.#library)
product.left
..md5)]}
(text.ends_with? ///artifact/extension.pom uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.pom)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded))]}
(text.ends_with? ..pom_sha-1 uri)
- {#try.Success [state (|> expected_package
- (value@ #///package.pom)
+ {try.#Success [state (|> expected_package
+ (value@ ///package.#pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
..sha-1)]}
(text.ends_with? ..pom_md5 uri)
- {#try.Success [state (|> dummy_package
- (value@ #///package.pom)
+ {try.#Success [state (|> dummy_package
+ (value@ ///package.#pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
..md5)]}
... else
- {#try.Failure "NOPE"})
- {#try.Failure "NOPE"}))
+ {try.#Failure "NOPE"})
+ {try.#Failure "NOPE"}))
(def: (on_upload uri binary state)
- {#try.Failure "NOPE"})))
+ {try.#Failure "NOPE"})))
(def: one
Test
@@ -250,7 +250,7 @@
[expected_artifact $///artifact.random
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
- (with@ #///package.pom (value@ #///package.pom expected_package))
+ (with@ ///package.#pom (value@ ///package.#pom expected_package))
(\ ///package.equivalence = expected_package)
not)
$///package.random)
@@ -260,28 +260,28 @@
(`` ($_ _.and
(in (do async.monad
[actual_package (/.one (///repository.mock good [])
- [#///dependency.artifact expected_artifact
- #///dependency.type ///artifact/type.lux_library])]
+ [///dependency.#artifact expected_artifact
+ ///dependency.#type ///artifact/type.lux_library])]
(_.cover' [/.one]
(case actual_package
- {#try.Success actual_package}
+ {try.#Success actual_package}
(\ ///package.equivalence =
- (with@ #///package.origin {#///repository/origin.Remote ""} expected_package)
+ (with@ ///package.#origin {///repository/origin.#Remote ""} expected_package)
actual_package)
- {#try.Failure _}
+ {try.#Failure _}
false))))
(~~ (template [<exception> <bad>]
[(in (do async.monad
[actual_package (/.one (///repository.mock <bad> [])
- [#///dependency.artifact expected_artifact
- #///dependency.type ///artifact/type.lux_library])]
+ [///dependency.#artifact expected_artifact
+ ///dependency.#type ///artifact/type.lux_library])]
(_.cover' [<exception>]
(case actual_package
- {#try.Failure error}
+ {try.#Failure error}
(exception.match? <exception> error)
- {#try.Success _}
+ {try.#Success _}
false))))]
[/.sha-1_does_not_match bad_sha-1]
@@ -295,7 +295,7 @@
[expected_artifact $///artifact.random
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
- (with@ #///package.pom (value@ #///package.pom expected_package))
+ (with@ ///package.#pom (value@ ///package.#pom expected_package))
(\ ///package.equivalence = expected_package)
not)
$///package.random)
@@ -309,30 +309,30 @@
(list (///repository.mock bad_sha-1 [])
(///repository.mock bad_md5 [])
(///repository.mock good []))
- [#///dependency.artifact expected_artifact
- #///dependency.type ///artifact/type.lux_library])]
+ [///dependency.#artifact expected_artifact
+ ///dependency.#type ///artifact/type.lux_library])]
(_.cover' [/.any]
(case actual_package
- {#try.Success actual_package}
+ {try.#Success actual_package}
(\ ///package.equivalence =
- (with@ #///package.origin {#///repository/origin.Remote ""} expected_package)
+ (with@ ///package.#origin {///repository/origin.#Remote ""} expected_package)
actual_package)
- {#try.Failure _}
+ {try.#Failure _}
false))))
(in (do async.monad
[.let [console ($///version.echo "")]
actual_package (/.any console
(list (///repository.mock bad_sha-1 [])
(///repository.mock bad_md5 []))
- [#///dependency.artifact expected_artifact
- #///dependency.type ///artifact/type.lux_library])]
+ [///dependency.#artifact expected_artifact
+ ///dependency.#type ///artifact/type.lux_library])]
(_.cover' [/.cannot_resolve]
(case actual_package
- {#try.Failure error}
+ {try.#Failure error}
(exception.match? /.cannot_resolve error)
- {#try.Success _}
+ {try.#Success _}
false))))
)))
@@ -358,41 +358,41 @@
[_ depender_package] $///package.random
[_ ignored_package] $///package.random
- .let [dependee [#///dependency.artifact dependee_artifact
- #///dependency.type ///artifact/type.lux_library]
- depender [#///dependency.artifact depender_artifact
- #///dependency.type ///artifact/type.lux_library]
- ignored [#///dependency.artifact ignored_artifact
- #///dependency.type ///artifact/type.lux_library]
+ .let [dependee [///dependency.#artifact dependee_artifact
+ ///dependency.#type ///artifact/type.lux_library]
+ depender [///dependency.#artifact depender_artifact
+ ///dependency.#type ///artifact/type.lux_library]
+ ignored [///dependency.#artifact ignored_artifact
+ ///dependency.#type ///artifact/type.lux_library]
dependee_pom (|> (\ ///.monoid identity)
- (with@ #///.identity {#.Some dependee_artifact})
+ (with@ ///.#identity {.#Some dependee_artifact})
///pom.write
try.trusted)
depender_pom (|> (\ ///.monoid identity)
- (with@ #///.identity {#.Some depender_artifact})
- (with@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
+ (with@ ///.#identity {.#Some depender_artifact})
+ (with@ ///.#dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
try.trusted)
ignored_pom (|> (\ ///.monoid identity)
- (with@ #///.identity {#.Some ignored_artifact})
+ (with@ ///.#identity {.#Some ignored_artifact})
///pom.write
try.trusted)
- dependee_package (with@ #///package.pom
+ dependee_package (with@ ///package.#pom
[dependee_pom
(|> dependee_pom (\ xml.codec encoded) (\ utf8.codec encoded))
- #///dependency/status.Unverified]
+ {///dependency/status.#Unverified}]
dependee_package)
- depender_package (with@ #///package.pom
+ depender_package (with@ ///package.#pom
[depender_pom
(|> depender_pom (\ xml.codec encoded) (\ utf8.codec encoded))
- #///dependency/status.Unverified]
+ {///dependency/status.#Unverified}]
depender_package)
- ignored_package (with@ #///package.pom
+ ignored_package (with@ ///package.#pom
[ignored_pom
(|> ignored_pom (\ xml.codec encoded) (\ utf8.codec encoded))
- #///dependency/status.Unverified]
+ {///dependency/status.#Unverified}]
ignored_package)]]
(in [[dependee depender ignored]
[dependee_package depender_package ignored_package]])))