summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-21 23:21:53 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-22 23:18:30 +0100
commitaccb682c5027cb91104cce7786f9dc4403adf51c (patch)
tree0277201fce300fd518ff6fe6e6d8612fa6e203df /tests
parent2924f0d6ce180a9d09eab994efb6a60c61fab3fd (diff)
downloadguix-accb682c5027cb91104cce7786f9dc4403adf51c.tar.gz
gexp: Allow <gexp-input> objects in #:allowed-references.
* guix/gexp.scm (lower-references): Add <gexp-input> case.
* tests/gexp.scm ("gexp->derivation #:allowed-references, specific
  output"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/gexp.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 4c31e22f15..27c08467e7 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -497,6 +497,23 @@
                                              (list "out" %bootstrap-guile))))
     (built-derivations (list drv))))
 
+(test-assertm "gexp->derivation #:allowed-references, specific output"
+  (mlet* %store-monad ((in  (gexp->derivation "thing"
+                                              #~(begin
+                                                  (mkdir #$output:ok)
+                                                  (mkdir #$output:not-ok))))
+                       (drv (gexp->derivation "allowed-refs"
+                                              #~(begin
+                                                  (pk #$in:not-ok)
+                                                  (mkdir #$output)
+                                                  (chdir #$output)
+                                                  (symlink #$output "self")
+                                                  (symlink #$in:ok "ok"))
+                                              #:allowed-references
+                                              (list "out"
+                                                    (gexp-input in "ok")))))
+    (built-derivations (list drv))))
+
 (test-assert "gexp->derivation #:allowed-references, disallowed"
   (let ((drv (run-with-store %store
                (gexp->derivation "allowed-refs"