diff options
Diffstat (limited to 'csc/strings-test.csc')
| -rw-r--r-- | csc/strings-test.csc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/csc/strings-test.csc b/csc/strings-test.csc index 2e6d240..49f8d20 100644 --- a/csc/strings-test.csc +++ b/csc/strings-test.csc @@ -44,6 +44,30 @@ (assert (not-found-error? got-exception)))) +(test contains + (assert-equal + #t + (contains "abc" "b"))) + + +(test doesnt-contain + (assert-equal + #f + (contains "abc" "d"))) + + +(test contains-empty + (assert-equal + #t + (contains "" ""))) + + +(test empty-contains + (assert-equal + #f + (contains "" "a"))) + + (test join-, (assert-equal "a,b,c" (join "," "a" "b" "c"))) @@ -58,3 +82,14 @@ (test join-empty (assert-equal "abc" (join "" "a" "b" "c"))) + + +(test split-empty + (assert-equal '("") (split "" " "))) + +(test split + (assert-equal '("a" "b") (split "a b" " "))) + + +(test split-trailing-empty + (assert-equal '("a" "") (split "a " " "))) |
