X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/7af531508c5931261ff8957708642cac67bf86a5..820f33aaed18b37f68bc4abfeea52df2df3bd374:/test-suite/tests/srfi-13.test diff --git a/test-suite/tests/srfi-13.test b/test-suite/tests/srfi-13.test index d8e379959..6864287c2 100644 --- a/test-suite/tests/srfi-13.test +++ b/test-suite/tests/srfi-13.test @@ -40,6 +40,12 @@ (with-test-prefix "string-any" + (pass-if "null string" + (not (string-any #\a ""))) + + (pass-if "start index == end index" + (not (string-any #\a "aaa" 1 1))) + (with-test-prefix "bad char_pred" (pass-if-exception "integer" exception:wrong-type-arg @@ -141,6 +147,25 @@ (pass-if "more than one match, start and end index" (string-any char-upper-case? "abCDE" 1 4)))) +;;; +;;; string-titlecase +;;; + +(with-test-prefix "string-titlecase" + + (pass-if "all-lower" + (string=? "Foo" (string-titlecase "foo"))) + + (pass-if "all-upper" + (string=? "Foo" (string-titlecase "FOO"))) + + (pass-if "two-words" + (string=? "Hello, World!" (string-titlecase "hello, world!"))) + + (pass-if "titlecase-characters" + (string=? (list->string '(#\762)) + (string-titlecase (list->string '(#\763)))))) + ;;; ;;; string-append/shared ;;; @@ -259,6 +284,12 @@ (with-test-prefix "string-every" + (pass-if "null string" + (string-every #\a "")) + + (pass-if "start index == end index" + (string-every #\a "bbb" 1 1)) + (with-test-prefix "bad char_pred" (pass-if-exception "integer" exception:wrong-type-arg