diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-05-13 12:16:08 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-05-13 13:29:27 +0200 |
commit | 437f62f02a1b8c89b8ab39ecd53926489fac42db (patch) | |
tree | e7d995116540267b2864b51db778e54b2994606d /tests | |
parent | e18e7cb9f4c08efb3b7233dd1042553924594743 (diff) | |
download | guix-437f62f02a1b8c89b8ab39ecd53926489fac42db.tar.gz |
utils: Add 'version-prefix?'.
* guix/utils.scm (version-prefix?): New procedure. * tests/utils.scm ("version-prefix?"): New test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/utils.scm b/tests/utils.scm index 197182acf7..3015b21b23 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -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") |