aboutsummaryrefslogtreecommitdiff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-01-13 12:14:08 -0500
committerMark H Weaver <mhw@netris.org>2015-01-13 12:14:08 -0500
commita813710a5fb0822e9d95088462d70f6522fe8457 (patch)
tree35299db4712eda92c809635716d530d085223e81 /tests/gexp.scm
parentd8cd15949092b7cd90ee1dcc4aefe87b3ba4a6fb (diff)
parent765f0ac8f9f67f775a667a4276faf85ddde6d7ea (diff)
downloadguix-a813710a5fb0822e9d95088462d70f6522fe8457.tar
guix-a813710a5fb0822e9d95088462d70f6522fe8457.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r--tests/gexp.scm26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index ea4df48403..d80f14344d 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -421,6 +421,30 @@
(return (and (zero? (close-pipe pipe))
(= (expt n 2) (string->number str)))))))
+(test-assert "text-file*"
+ (let ((references (store-lift references)))
+ (run-with-store %store
+ (mlet* %store-monad
+ ((drv (package->derivation %bootstrap-guile))
+ (guile -> (derivation->output-path drv))
+ (file (text-file "bar" "This is bar."))
+ (text (text-file* "foo"
+ %bootstrap-guile "/bin/guile "
+ `(,%bootstrap-guile "out") "/bin/guile "
+ drv "/bin/guile "
+ file))
+ (done (built-derivations (list text)))
+ (out -> (derivation->output-path text))
+ (refs (references out)))
+ ;; Make sure we get the right references and the right content.
+ (return (and (lset= string=? refs (list guile file))
+ (equal? (call-with-input-file out get-string-all)
+ (string-append guile "/bin/guile "
+ guile "/bin/guile "
+ guile "/bin/guile "
+ file)))))
+ #:guile-for-build (package-derivation %store %bootstrap-guile))))
+
(test-assert "printer"
(string-match "^#<gexp \\(string-append .*#<package coreutils.*\
\"/bin/uname\"\\) [[:xdigit:]]+>$"