(string-concatenate, string-concatenate/shared): New tests.
authorKevin Ryde <user42@zip.com.au>
Sun, 10 Apr 2005 22:19:26 +0000 (22:19 +0000)
committerKevin Ryde <user42@zip.com.au>
Sun, 10 Apr 2005 22:19:26 +0000 (22:19 +0000)
test-suite/tests/srfi-13.test

index 666d3dc..55826c9 100644 (file)
     (pass-if "more than one match, start and end index"
       (string-any char-upper-case? "abCDE" 1 4))))
 
+;;;
+;;; string-concatenate
+;;;
+
+(with-test-prefix "string-concatenate"
+
+  (pass-if-exception "inum" exception:wrong-type-arg
+    (string-concatenate 123))
+
+  (pass-if-exception "symbol" exception:wrong-type-arg
+    (string-concatenate 'x))
+
+  (pass-if-exception "improper 1" exception:wrong-type-arg
+    (string-concatenate '("a" . "b")))
+
+  (pass-if (equal? "abc" (string-concatenate '("a" "b" "c")))))
+
+;;;
+;;; string-concatenate/shared
+;;;
+
+(with-test-prefix "string-concatenate/shared"
+
+  (pass-if-exception "inum" exception:wrong-type-arg
+    (string-concatenate/shared 123))
+
+  (pass-if-exception "symbol" exception:wrong-type-arg
+    (string-concatenate/shared 'x))
+
+  (pass-if-exception "improper 1" exception:wrong-type-arg
+    (string-concatenate/shared '("a" . "b")))
+
+  (pass-if (equal? "abc" (string-concatenate/shared '("a" "b" "c")))))
+
 ;;;
 ;;; string-every
 ;;;