[uim-commit] r1474 - branches/r5rs/sigscheme/test
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Sep 11 13:53:49 PDT 2005
Author: yamaken
Date: 2005-09-11 13:53:47 -0700 (Sun, 11 Sep 2005)
New Revision: 1474
Modified:
branches/r5rs/sigscheme/test/test-string.scm
Log:
* sigscheme/test/test-string.scm
- Add tests for invalid "\\" handlings. Fix it!
Modified: branches/r5rs/sigscheme/test/test-string.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-string.scm 2005-09-11 20:26:08 UTC (rev 1473)
+++ branches/r5rs/sigscheme/test/test-string.scm 2005-09-11 20:53:47 UTC (rev 1474)
@@ -35,6 +35,9 @@
;; check string-length
(assert-equal? "alphabet string-length check" 5 (string-length "aiueo"))
(assert-equal? "hiragana string-length check" 5 (string-length "¤¢¤¤¤¦¤¨¤ª"))
+(assert-equal? "backslash string-length check" 1 (string-length "\\"))
+(assert-equal? "backslash string-length check" 2 (string-length "\\\\"))
+(assert-equal? "backslash string-length check" 3 (string-length "\\\\\\"))
;; string=? check
(assert-equal? "alphabet string=? check" #t (string=? "aiueo" "aiueo"))
@@ -59,11 +62,16 @@
;; string->list
(assert "string->list check" (equal? '(#\¤¢ #\i #\¤¦ #\e #\¤ª) (string->list "¤¢i¤¦e¤ª")))
+(assert-equal? "string->list check" '(#\\) (string->list "\\"))
+(assert-equal? "string->list check" '(#\\ #\\) (string->list "\\\\"))
+(assert-equal? "string->list check" '(#\\ #\\ #\\) (string->list "\\\\\\"))
;; list->string
(assert-equal? "list->string check" "¤¢a¤¤" (list->string '(#\¤¢ #\a #\¤¤)))
-(assert-equal? "list->string check" "\\" (list->string '(#\\)))
+(assert-equal? "list->string check" "\\" (list->string '(#\\)))
+(assert-equal? "list->string check" "\\\\" (list->string '(#\\ #\\)))
+(assert-equal? "list->string check" "\\\\\\" (list->string '(#\\ #\\ #\\)))
(assert-equal? "list->string check" "\t" (list->string '(#\ )))
(assert-equal? "list->string check" "\n" (list->string '(#\
)))
More information about the uim-commit
mailing list