aboutsummaryrefslogtreecommitdiff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-25 10:52:52 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-25 10:52:52 +0100
commit25d5b708a636ecf779035f75ad110574fc0262b9 (patch)
tree7d8429a59b7523d79790c5f4cdb5b96fabe8494e /tests/gexp.scm
parent17287d7d47567aa1649250182e0f7ab11d5d55d1 (diff)
parent614c2188420a266ec512c9c04af3bb2ea46c4dc4 (diff)
downloadpatches-25d5b708a636ecf779035f75ad110574fc0262b9.tar
patches-25d5b708a636ecf779035f75ad110574fc0262b9.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r--tests/gexp.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 4c31e22f15..0540969503 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -160,6 +160,12 @@
(equal? `(list ,guile ,cu ,libc ,bu)
(gexp->sexp* exp target)))))
+(test-equal "ungexp + ungexp-native, nested"
+ (list `((,%bootstrap-guile "out")) '<> `((,coreutils "out")))
+ (let* ((exp (gexp (list (ungexp-native (gexp (ungexp coreutils)))
+ (ungexp %bootstrap-guile)))))
+ (list (gexp-inputs exp) '<> (gexp-native-inputs exp))))
+
(test-assert "input list"
(let ((exp (gexp (display
'(ungexp (list %bootstrap-guile coreutils)))))
@@ -497,6 +503,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"