aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-08 22:53:31 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-08 22:53:31 +0200
commitee48b283fadca825ca08500eeb3870fd4141221e (patch)
tree31c8160c6a65c02b89692db2276b2e9b4f90774e /tests/packages.scm
parentcaddc24fa4e8dc2b5c430feece9a50c7889d73bc (diff)
downloadguix-ee48b283fadca825ca08500eeb3870fd4141221e.tar
guix-ee48b283fadca825ca08500eeb3870fd4141221e.tar.gz
tests: Adjust `package-field-location' test for Guile <= 2.0.6.
* tests/packages.scm ("package-field-location"): Check the result of `read-at' against both VALUE and (FIELD VALUE). Reported by Matthew Lien - 練喆明" <bluet@bluet.org>.
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index a4bb7fbd31..78770c7d94 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -70,10 +70,14 @@
(goto port line column)
(read port))))))
- (and (equal? (read-at (package-field-location %bootstrap-guile 'name))
- (package-name %bootstrap-guile))
- (equal? (read-at (package-field-location %bootstrap-guile 'version))
- (package-version %bootstrap-guile))
+ ;; Until Guile 2.0.6 included, source properties were added only to pairs.
+ ;; Thus, check against both VALUE and (FIELD VALUE).
+ (and (member (read-at (package-field-location %bootstrap-guile 'name))
+ (let ((name (package-name %bootstrap-guile)))
+ (list name `(name ,name))))
+ (member (read-at (package-field-location %bootstrap-guile 'version))
+ (let ((version (package-version %bootstrap-guile)))
+ (list version `(version ,version))))
(not (package-field-location %bootstrap-guile 'does-not-exist)))))
(test-assert "package-transitive-inputs"