aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2021-07-10 03:10:43 -0400
committerEduardo Julian2021-07-10 03:10:43 -0400
commit4610968193df10af12c91f699fec39aeb3ef703a (patch)
tree27d1578548ad49f5aefe76fb696a7af10361c9cf /stdlib/source/test/aedifex
parentf3e869d0246e956399ec31a074c6c6299ff73602 (diff)
Made the "try" macro into a common one, instead of a host-specific one.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux7
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux12
2 files changed, 17 insertions, 2 deletions
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index ecb34437a..819495c02 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -103,8 +103,11 @@
(///dependency/deployment.all local))
post (|> (\ ///.monoid identity)
(set@ #///.dependencies (set.from_list ///dependency.hash (list dependee depender)))
- (/.do! console local (list (///repository.mock ($///dependency/resolution.single depender_artifact depender_package)
- []))))
+ (/.do! console local
+ (list (///repository.mock ($///dependency/resolution.single depender_artifact depender_package)
+ []))
+ (function (_ url)
+ (///repository.mock $///dependency/resolution.nope []))))
#let [had_dependee_before!
(set.member? pre dependee_artifact)
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 42116844f..6d25ffd4b 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -86,6 +86,16 @@
(\ ///hash.md5_codec encode)
(\ utf8.codec encode)))
+(def: #export nope
+ (Mock Any)
+ (implementation
+ (def: the_description
+ "[0]")
+ (def: (on_download uri state)
+ (#try.Failure "NOPE"))
+ (def: (on_upload uri binary state)
+ (#try.Failure "NOPE"))))
+
(def: #export (single artifact package)
(-> Artifact Package (Mock Any))
(let [expected (///artifact.uri (get@ #///artifact.version artifact) artifact)]
@@ -407,6 +417,8 @@
(list (///repository.mock (..single dependee_artifact dependee_package) [])
(///repository.mock (..single depender_artifact depender_package) [])
(///repository.mock (..single ignored_artifact ignored_package) []))
+ (function (_ url)
+ (///repository.mock ..nope []))
(list depender)
/.empty)]
(_.cover' [/.all]