From 7db3ff4a29415ccc4f781c3e2450deb97d51a26f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 23 Aug 2013 15:51:36 +0200 Subject: utils: Add `guile-version>?', and use it. This fixes Guile version comparisons when (version) has a vendor-specific suffix. Reported by Andreas Enge . * guix/utils.scm (guile-version>?): New procedure. * tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New tests. * guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use `guile-version>?' instead of `version>?'. * guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise. --- tests/utils.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/utils.scm b/tests/utils.scm index 3be60e443d..4f6ecc514d 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -66,6 +66,12 @@ ("nixpkgs" "1.0pre22125_a28fe19") ("gtk2" "2.38.0")))) +(test-assert "guile-version>? 1.8" + (guile-version>? "1.8")) + +(test-assert "guile-version>? 10.5" + (not (guile-version>? "10.5"))) + (test-equal "string-tokenize*" '(("foo") ("foo" "bar" "baz") -- cgit 1.4.1