summaryrefslogtreecommitdiff
path: root/tests/union.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/union.scm')
-rw-r--r--tests/union.scm21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/union.scm b/tests/union.scm
index 317d49dc35e..a3859434a23 100644
--- a/tests/union.scm
+++ b/tests/union.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
3;;; 3;;;
4;;; This file is part of GNU Guix. 4;;; This file is part of GNU Guix.
5;;; 5;;;
@@ -64,6 +64,25 @@
64 (bin make) 64 (bin make)
65 (share (doc (make README)))))) 65 (share (doc (make README))))))
66 66
67(test-equal "delete-duplicate-leaves, default"
68 '(bin make touch ls)
69 (delete-duplicate-leaves '(bin ls make touch ls)))
70
71(test-equal "delete-duplicate-leaves, file names"
72 '("doc" ("info"
73 "/binutils/ld.info"
74 "/gcc/gcc.info"
75 "/binutils/standards.info"))
76 (let ((leaf=? (lambda (a b)
77 (string=? (basename a) (basename b)))))
78 (delete-duplicate-leaves '("doc"
79 ("info"
80 "/binutils/ld.info"
81 "/binutils/standards.info"
82 "/gcc/gcc.info"
83 "/gcc/standards.info"))
84 leaf=?)))
85
67(test-skip (if (and %store 86(test-skip (if (and %store
68 (false-if-exception 87 (false-if-exception
69 (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV))) 88 (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)))