aboutsummaryrefslogtreecommitdiffstats
path: root/strings-test.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-01-09 22:55:59 -0800
committerRose Hogenson <rhogenson@posteo.net>2022-01-09 22:55:59 -0800
commit77583a881b03ce38c8065c40641489fe88b61eb2 (patch)
treed4f65cfd698fee8e63168b4a5b64ab4123177fc3 /strings-test.csc
parentRemove str- prefixes from the strings library. (diff)
downloadchromatopelma-77583a881b03ce38c8065c40641489fe88b61eb2.tar.zst
Write the linker.
Diffstat (limited to 'strings-test.csc')
-rw-r--r--strings-test.csc18
1 files changed, 17 insertions, 1 deletions
diff --git a/strings-test.csc b/strings-test.csc
index 3fededb..2e6d240 100644
--- a/strings-test.csc
+++ b/strings-test.csc
@@ -34,7 +34,7 @@
(assert-equal 8 (find "a" "sdfdfdfsasdfe")))
-(test test-str-find-notfound
+(test find-notfound
(let* ((match "a")
(str "def")
(got-exception '()))
@@ -42,3 +42,19 @@
((not-found-error? e) (set! got-exception e)))
(find match str))
(assert (not-found-error? got-exception))))
+
+
+(test join-,
+ (assert-equal "a,b,c" (join "," "a" "b" "c")))
+
+
+(test join-none
+ (assert-equal "" (join ",")))
+
+
+(test join-singleton
+ (assert-equal "x" (join "," "x")))
+
+
+(test join-empty
+ (assert-equal "abc" (join "" "a" "b" "c")))