aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-27 22:05:40 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-27 22:05:40 +0100
commitf9efe568c3cd46f0aecb5bdd35731e98a29dbcea (patch)
tree3a93bc6103f649ed2cc8afe09783682fc3e32db9 /tests
parent4b23c4664ec67b8c6329c4aa82a331d2e48341cb (diff)
downloadguix-f9efe568c3cd46f0aecb5bdd35731e98a29dbcea.tar
guix-f9efe568c3cd46f0aecb5bdd35731e98a29dbcea.tar.gz
gexp: Aggregate outputs of compound gexps.
* guix/gexp.scm (gexp-outputs)[add-reference-output]: Recurse into lists. * tests/gexp.scm ("output list + ungexp-splicing list, combined gexps"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/gexp.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index a6fb550540..2ec6c8e3ef 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -230,6 +230,16 @@
(gexp-outputs exp2))
(= 2 (length (gexp-outputs exp2))))))
+(test-assert "output list + ungexp-splicing list, combined gexps"
+ (let* ((exp0 (gexp (mkdir (ungexp output))))
+ (exp1 (gexp (mkdir (ungexp output "foo"))))
+ (exp2 (gexp (begin (display "hi!")
+ (ungexp-splicing (list exp0 exp1))))))
+ (and (lset= equal?
+ (append (gexp-outputs exp0) (gexp-outputs exp1))
+ (gexp-outputs exp2))
+ (= 2 (length (gexp-outputs exp2))))))
+
(test-assertm "gexp->file"
(mlet* %store-monad ((exp -> (gexp (display (ungexp %bootstrap-guile))))
(guile (package-file %bootstrap-guile))