[uim-commit] r2037 - trunk/test

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Nov 6 23:16:02 PST 2005


Author: yamaken
Date: 2005-11-06 23:15:41 -0800 (Sun, 06 Nov 2005)
New Revision: 2037

Modified:
   trunk/test/test-util.scm
Log:
* test/test-util.scm
  - (test R6RS(SRFI-75) and C89 compliant escape sequences of Gauche):
    New test
  - (test string-escape): Add some tests for additional escape
    sequences


Modified: trunk/test/test-util.scm
===================================================================
--- trunk/test/test-util.scm	2005-11-07 06:31:37 UTC (rev 2036)
+++ trunk/test/test-util.scm	2005-11-07 07:15:41 UTC (rev 2037)
@@ -542,17 +542,51 @@
 		 (uim '(string-append-map car '(("c" "C") ("a" "A") ("r" "R")))))))
 
 (define-uim-test-case "testcase util misc"
+  ("test R6RS(SRFI-75) and C89 compliant escape sequences of Gauche"
+   (assert-false (string=? "t" "\t"))  ;; #\tab
+   (assert-false (string=? "n" "\n"))  ;; #\linefeed
+   (assert-false (string=? "f" "\f"))  ;; #\page
+   (assert-false (string=? "r" "\r"))  ;; #\return
+
+   ;; not supported by Gauche 0.8.6
+   ;; FIXME: enable when Gauche support it
+;;   (assert-false (string=? "a" "\a"))  ;; #\alarm
+;;   (assert-false (string=? "b" "\b"))  ;; #\backspace
+;;   (assert-false (string=? "v" "\v"))  ;; #\vtab
+   )
+
   ("test string-escape"
    ;; empty string
    (assert-equal "\"\""
 		 (uim '(string-escape "")))
    ;; single character
+   ;; R5RS
    (assert-equal "\"\\\"\""
 		 (uim '(string-escape "\"")))
    (assert-equal "\"\\\\\""
 		 (uim '(string-escape "\\")))
+
+   ;; R6RS(SRFI-75) and C89 (uim-sh)
+   (assert-equal "\"\\t\""
+		 (uim '(string-escape "\t")))  ;; #\tab
    (assert-equal "\"\\n\""
-		 (uim '(string-escape "\n")))
+		 (uim '(string-escape "\n")))  ;; #\linefeed
+   (assert-equal "\"\\f\""
+		 (uim '(string-escape "\f")))  ;; #\page
+   (assert-equal "\"\\r\""
+		 (uim '(string-escape "\r")))  ;; #\return
+
+   ;; R6RS(SRFI-75) and C89 (uim-sh), but cannot test since Gauche
+   ;; does not support the escape sequences.
+   ;; FIXME: enable when Gauche support it
+;;   (assert-equal "\"\\a\""
+;;		 (uim '(string-escape "\a")))  ;; #\alarm
+;;   (assert-equal "\"\\b\""
+;;		 (uim '(string-escape "\b")))  ;; #\backspace
+;;   (assert-equal "\"\\v\""
+;;		 (uim '(string-escape "\v")))  ;; #\vtab
+
+   ;; R5RS
    (assert-equal "\"a\""
 		 (uim '(string-escape "a")))
    (assert-equal "\"b\""



More information about the uim-commit mailing list