(import scheme) (cond-expand (chicken-4 (use natural-sort test srfi-13)) (chicken-5 (import natural-sort) (import test) (import (srfi 13)))) (test-group "Comparison" (test 0 (natural-string-compare "" "")) (test -1 (natural-string-compare "" "foo")) (test +1 (natural-string-compare "foo" "")) (test 0 (natural-string-compare "foo" "foo")) (test -1 (natural-string-compare "bar" "foo")) (test +1 (natural-string-compare "foo" "bar")) (test 0 (natural-string-compare "foo123" "foo123")) (test -1 (natural-string-compare "foo" "foo123")) (test +1 (natural-string-compare "foo123" "foo")) (test -1 (natural-string-compare "foo2" "foo123")) (test -1 (natural-string-compare "foo99" "foo123")) (test 0 (natural-string-compare "foo123bar" "foo123bar")) (test -1 (natural-string-compare "foo123bar" "foo123baz")) (test +1 (natural-string-compare "foo123qux" "foo123baz"))) (test-group "Predicates" (test #t (natural-string? "foo9" "foo10")) (test #f (natural-string>? "foo9" "foo10")) (test #f (natural-string>=? "foo9" "foo10"))) (test-group "Flonums (default)" (test #f (natural-string