aboutsummaryrefslogtreecommitdiff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-08-26 11:28:23 +0200
committerLudovic Courtès <ludo@gnu.org>2015-08-27 00:49:23 +0200
commitc2b8467645bb2c2e17eb9c580f39e345c4dc2f4a (patch)
tree754462cfbcccdb8c58f000ee5bf88d064279b657 /tests/gexp.scm
parentf7283db37d58f1a7dede5f410c6c0a75aa82b12e (diff)
downloadpatches-c2b8467645bb2c2e17eb9c580f39e345c4dc2f4a.tar
patches-c2b8467645bb2c2e17eb9c580f39e345c4dc2f4a.tar.gz
gexp: Add 'lower-object'.
* guix/gexp.scm (lower-object): New procedure. (lower-inputs, lower-references, gexp->sexp): Use it. * tests/gexp.scm ("lower-object"): New test. * doc/guix.texi (G-Expressions): Document it.
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r--tests/gexp.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 0749811ea8..492f3d6d89 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -654,6 +654,13 @@
(parameterize ((%current-target-system "fooooo"))
(derivation? (run-with-store %store mval)))))
+(test-assertm "lower-object"
+ (mlet %store-monad ((drv1 (lower-object %bootstrap-guile))
+ (drv2 (lower-object (package-source coreutils)))
+ (item (lower-object (plain-file "foo" "Hello!"))))
+ (return (and (derivation? drv1) (derivation? drv2)
+ (store-path? item)))))
+
(test-assert "printer"
(string-match "^#<gexp \\(string-append .*#<package coreutils.*\
\"/bin/uname\"\\) [[:xdigit:]]+>$"