aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index fc75e38730..e9c8690730 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -79,6 +79,10 @@
(write
(dummy-package "foo" (location #f)))))))
+(test-assert "hidden-package"
+ (and (hidden-package? (hidden-package (dummy-package "foo")))
+ (not (hidden-package? (dummy-package "foo")))))
+
(test-assert "package-field-location"
(let ()
(define (goto port line column)
@@ -745,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)