summaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-29 23:23:59 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-29 23:23:59 +0200
commit6e1f8d552b73e508bba47dedb5676ce5ccdcc398 (patch)
tree952a8fa2652ad26946100707311824b8c7a88768 /tests/packages.scm
parentc24b896365ebf0c783140e53e000305e682d18c5 (diff)
parent8e92d5465fc154fed5d06f7e4a64d7dcccded74d (diff)
downloadpatches-6e1f8d552b73e508bba47dedb5676ce5ccdcc398.tar
patches-6e1f8d552b73e508bba47dedb5676ce5ccdcc398.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 613b2f1221..836d446657 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1227,6 +1227,38 @@
(lambda (key . args)
key)))
+(test-equal "specification->package+output"
+ `((,coreutils "out") (,coreutils "debug"))
+ (list (call-with-values (lambda ()
+ (specification->package+output "coreutils"))
+ list)
+ (call-with-values (lambda ()
+ (specification->package+output "coreutils:debug"))
+ list)))
+
+(test-equal "specification->package+output invalid output"
+ 'error
+ (catch 'quit
+ (lambda ()
+ (specification->package+output "coreutils:does-not-exist"))
+ (lambda _
+ 'error)))
+
+(test-equal "specification->package+output no default output"
+ `(,coreutils #f)
+ (call-with-values
+ (lambda ()
+ (specification->package+output "coreutils" #f))
+ list))
+
+(test-equal "specification->package+output invalid output, no default"
+ 'error
+ (catch 'quit
+ (lambda ()
+ (specification->package+output "coreutils:does-not-exist" #f))
+ (lambda _
+ 'error)))
+
(test-equal "find-package-locations"
(map (lambda (package)
(cons (package-version package)