summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-02 16:26:13 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-02 16:26:13 +0100
commit7e75a6739bf02c39baf8340e31e590c2c7c5fd16 (patch)
tree477b7fbbcd9882179218c25226fc58161963b207 /tests
parent3820d3973982048e5b93ad08d619c893bc50de14 (diff)
downloadpatches-7e75a6739bf02c39baf8340e31e590c2c7c5fd16.tar
patches-7e75a6739bf02c39baf8340e31e590c2c7c5fd16.tar.gz
gexp: Make sure 'gexp-outputs' removes duplicate outputs.
Fixes a regression introduced in f9efe56. * guix/gexp.scm (gexp-outputs): Add call to 'delete-duplicates'. * tests/gexp.scm ("output list, combined gexps, duplicate output"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/gexp.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 2ec6c8e3ef..783ca2cdbc 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -230,6 +230,13 @@
(gexp-outputs exp2))
(= 2 (length (gexp-outputs exp2))))))
+(test-equal "output list, combined gexps, duplicate output"
+ 1
+ (let* ((exp0 (gexp (mkdir (ungexp output))))
+ (exp1 (gexp (begin (mkdir (ungexp output)) (ungexp exp0))))
+ (exp2 (gexp (begin (mkdir (ungexp output)) (ungexp exp1)))))
+ (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"))))