Ignore:
Timestamp:
04/04/21 07:26:31 (4 months ago)
Author:
Kon Lovett
Message:

add semantic-version & support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/string-utils/trunk/tests/string-utils-test.scm

    r39544 r39830  
    132132  (test "fooba" (string-longest-common-prefix '("foobaz" "foobar")))
    133133  (test "foo" (string-longest-common-suffix '("bazfoo" "barfoo")))
     134
     135  (test '(("a" "b" "c") ("." ",")) (receive (string-unzip "a.b,c" ",.")))
     136  (test "a.b,c" (string-zip '("a" "b" "c") '("." ",")))
     137)
     138
     139;;
     140
     141(import semantic-version)
     142
     143(test-group "semantic-version"
     144
     145  (test-assert (version-valid? '("a" "b" "c") '("." ",")))
     146  (test '(("a" "b" "c") ("." ",")) (receive (version-split "a.b,c" )))
     147  (test "a.b,c" (version-combine '("a" "b" "c") '("." ",")))
     148
     149  (test '("a" "1" "b") (version-inc '("a" "2" "b") 1 -1))
     150  (test '("1" "2" "4") (version-inc '("1" "2" "3")))
    134151)
    135152
Note: See TracChangeset for help on using the changeset viewer.