1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

utils: Add 'version-prefix?'.

* guix/utils.scm (version-prefix?): New procedure.
* tests/utils.scm ("version-prefix?"): New test.
This commit is contained in:
Ludovic Courtès
2018-05-13 12:16:08 +02:00
parent e18e7cb9f4
commit 437f62f02a
2 changed files with 29 additions and 1 deletions

View File

@@ -72,6 +72,12 @@
(test-assert "guile-version>? 10.5"
(not (guile-version>? "10.5")))
(test-assert "version-prefix?"
(and (version-prefix? "4.1" "4.1.2")
(version-prefix? "4.1" "4.1")
(not (version-prefix? "4.1" "4.16.2"))
(not (version-prefix? "4.1" "4"))))
(test-equal "string-tokenize*"
'(("foo")
("foo" "bar" "baz")