summary refs log tree commit diff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-06-27 23:33:48 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-27 23:33:48 +0200
commit5cc1075a76392666d3d733837f5c6252b1e48002 (patch)
treeaff2a303881a6fe53021a6e78a767958e608719b /tests/packages.scm
parent9c2563a80b6f1d8fb8677f5314e6180ea9916aa5 (diff)
parentc30d117822a8ca26cd8c06c0a3974955bef68eac (diff)
downloadguix-5cc1075a76392666d3d733837f5c6252b1e48002.tar.gz
Merge branch 'master' into core-updates
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 bd100bea5b..0478fff237 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1244,6 +1244,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)