aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-07-28 18:53:13 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-28 18:53:13 +0200
commit386b71d1b961a52201f64591076e51487a87bf0b (patch)
treedf2354ddeba7750d8fa39f5a9c4688ed2b6410af /tests/packages.scm
parent6980511b7391e65a307689f90e4ef5c1979e4541 (diff)
downloadgnu-guix-386b71d1b961a52201f64591076e51487a87bf0b.tar
gnu-guix-386b71d1b961a52201f64591076e51487a87bf0b.tar.gz
gnu: commencement: 'guile-final' is now "hidden".
This way, we no longer have this annoying warning: $ guix build guile -n guix build: warning: ambiguous package specification `guile' guix build: warning: choosing guile-2.0.11 from gnu/packages/guile.scm:128:2 * gnu/packages/commencement.scm (guile-final): Use 'hidden-package'. * tests/packages.scm ("fold-packages, hidden package"): New test.
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 7c9ad05c21..e9c8690730 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -749,6 +749,20 @@
r))
#f))
+(test-assert "fold-packages, hidden package"
+ ;; There are two public variables providing "guile@2.0" ('guile-final' in
+ ;; commencement.scm and 'guile-2.0/fixed' in guile.scm), but only the latter
+ ;; should show up.
+ (match (fold-packages (lambda (p r)
+ (if (and (string=? (package-name p) "guile")
+ (string-prefix? "2.0"
+ (package-version p)))
+ (cons p r)
+ r))
+ '())
+ ((one)
+ (eq? one guile-2.0/fixed))))
+
(test-assert "find-packages-by-name"
(match (find-packages-by-name "hello")
(((? (cut eq? hello <>))) #t)