mes: string-join: Support optional delimiter, support grammar.
[mes.git] / tests / srfi-13.test
index 3c7ef8533022d0d4da716687e7ff42df609a3ff6..882b4ce3e2997b422b0a766946d714ffffcabd15 100755 (executable)
@@ -31,6 +31,22 @@ exit $?
 (pass-if "first dummy" #t)
 (pass-if-not "second dummy" #f)
 
+(pass-if-equal "string-join"
+               "foo bar"
+               (string-join '("foo" "bar")))
+
+(pass-if-equal "string-join infix"
+               "foo+bar"
+               (string-join '("foo" "bar") "+"))
+
+(pass-if-equal "string-join prefix"
+               ",foo,bar"
+               (string-join '("foo" "bar") "," 'prefix))
+
+(pass-if-equal "string-join suffix"
+               "foo,bar,"
+               (string-join '("foo" "bar") "," 'suffix))
+
 (pass-if-equal "string-split"
                '("foo")
                (string-split "foo" #\:))