[uim-commit] r2253 - branches/r5rs/sigscheme/test
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Nov 25 00:34:22 PST 2005
Author: yamaken
Date: 2005-11-25 00:33:54 -0800 (Fri, 25 Nov 2005)
New Revision: 2253
Modified:
branches/r5rs/sigscheme/test/test-enc-eucgeneric.scm
branches/r5rs/sigscheme/test/test-enc-eucjp.scm
branches/r5rs/sigscheme/test/test-enc-sjis.scm
branches/r5rs/sigscheme/test/test-enc-utf8.scm
Log:
* sigscheme/test/test-enc-utf8.scm
* sigscheme/test/test-enc-eucjp.scm
- Fix coding-system specification
* sigscheme/test/test-enc-eucgeneric.scm
- Fix coding-system specification
- Remove a JIS X 0201
* sigscheme/test/test-enc-sjis.scm
- Fix coding-system specification
- Fix EUC-JP encoded text to SJIS
- Fix broken JIS X 0213 plain 2 character to 0xf040
Modified: branches/r5rs/sigscheme/test/test-enc-eucgeneric.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-enc-eucgeneric.scm 2005-11-25 06:12:52 UTC (rev 2252)
+++ branches/r5rs/sigscheme/test/test-enc-eucgeneric.scm 2005-11-25 08:33:54 UTC (rev 2253)
@@ -1,5 +1,5 @@
#! /usr/bin/env sscm -C EUC-CN
-;; -*- euc-cn -*-
+;; -*- buffer-file-coding-system: euc-jp -*-
;; FileName : test-enc-eucgeneric.scm
;; About : unit test for EUC string
@@ -43,7 +43,10 @@
(assert-equal? "list->string 1" "3Æü¤Ç" (list->string '(#\3 #\Æü #\¤Ç)))
(assert-equal? "string->list 1" '(#\¤¡ #\¤ #\¤ë) (string->list "¤¡¤¤ë"))
-(assert-equal? "string-ref 1" #\Êâ (string-ref "»õhiÊâÍÊâ" 3))
+;; since single shift is only supported in EUC-JP in SigScheme, the JIS X 0201
+;; kana character is replaced to JIS x 0208. -- YamaKen 2005-11-25
+(assert-equal? "string-ref 1" #\Êâ (string-ref "»õhiÊâ¤ØÊâ" 3))
+
(assert-equal? "make-string 1" "ÊâÊâÊâÊâÊâ" (make-string 5 #\Êâ))
(assert-equal? "string-copy 1" "¶â¶ä¹á" (string-copy "¶â¶ä¹á"))
(assert-equal? "string-set! 1" "¶â·Ë¶Ì" (string-set!
Modified: branches/r5rs/sigscheme/test/test-enc-eucjp.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-enc-eucjp.scm 2005-11-25 06:12:52 UTC (rev 2252)
+++ branches/r5rs/sigscheme/test/test-enc-eucjp.scm 2005-11-25 08:33:54 UTC (rev 2253)
@@ -1,5 +1,5 @@
#! /usr/bin/env sscm -C EUC-JP
-;; -*- euc-jp -*-
+;; -*- buffer-file-coding-system: euc-jisx0213 -*-
;; FileName : test-enc-eucjp.scm
;; About : unit test for EUC-JP string
Modified: branches/r5rs/sigscheme/test/test-enc-sjis.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-enc-sjis.scm 2005-11-25 06:12:52 UTC (rev 2252)
+++ branches/r5rs/sigscheme/test/test-enc-sjis.scm 2005-11-25 08:33:54 UTC (rev 2253)
@@ -1,5 +1,6 @@
#! /usr/bin/env sscm -C SHIFT_JIS
-;; -*- sjis -*-
+;; -*- buffer-file-coding-system: shift_jisx0213 -*-
+;; C-x RET c shift_jisx0213 C-x C-f test-enc-sjis.scm
;; FileName : test-enc-sjis.scm
;; About : unit test for SJIS string
@@ -35,24 +36,24 @@
(load "./test/unittest.scm")
-(assert-equal? "string 1" "Èþ¿Í¤Ë¤Ï" (string #\Èþ #\¿Í #\¤Ë #\¤Ï))
-(assert-equal? "list->string 1" "3Æü¤Ç" (list->string '(#\3 #\Æü #\¤Ç)))
-(assert-equal? "string->list 1" '(#\¤¡ #\¤ #\¤ë) (string->list "¤¡¤¤ë"))
+(assert-equal? "string 1" "ülÉÍ" (string #\ü #\l #\É #\Í))
+(assert-equal? "list->string 1" "3úÅ" (list->string '(#\3 #\ú #\Å)))
+(assert-equal? "string->list 1" '(#\ #\« #\é) (string->list "«é"))
-(assert-equal? "string-ref 1" #\Êâ (string-ref "»õhiÊâÍÊâ" 3))
-(assert-equal? "make-string 1" "ÊâÊâÊâÊâÊâ" (make-string 5 #\Êâ))
-(assert-equal? "string-copy 1" "¶â¶ä¹á" (string-copy "¶â¶ä¹á"))
-(assert-equal? "string-set! 1" "¶â·Ë¶Ì" (string-set!
- (string-copy "¶â·Ë¤È")
+(assert-equal? "string-ref 1" #\à (string-ref "hiàÍà" 3))
+(assert-equal? "make-string 1" "ààààà" (make-string 5 #\à))
+(assert-equal? "string-copy 1" "àâ" (string-copy "àâ"))
+(assert-equal? "string-set! 1" "àjÊ" (string-set!
+ (string-copy "àjÆ")
2
- #\¶Ì))
+ #\Ê))
-;; The character after ¡ù is in JIS X 0213 plane 2.
-(define str1 "¤¢Ë¥ãah˽\\˽n!!¡ù !")
-(define str1-list '(#\¤¢ #\Ë #\¥ã #\a #\h #\˽ #\\ #\˽ #\n #\! #\! #\¡ù #\ #\!))
+;; The character after is in JIS X 0213 plane 2.
+(define str1 " Ëah\\\\n!!ð@!")
+(define str1-list '(#\ #\Ë #\ #\a #\h #\\ #\\ #\\ #\n #\! #\! #\ #\ð@ #\!))
(assert-equal? "string 2" str1 (apply string str1-list))
(assert-equal? "list->string 2" str1-list (string->list str1))
Modified: branches/r5rs/sigscheme/test/test-enc-utf8.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-enc-utf8.scm 2005-11-25 06:12:52 UTC (rev 2252)
+++ branches/r5rs/sigscheme/test/test-enc-utf8.scm 2005-11-25 08:33:54 UTC (rev 2253)
@@ -1,5 +1,5 @@
#! /usr/bin/env sscm -C UTF-8
-;; -*- utf8 -*-
+;; -*- buffer-file-coding-system: utf-8 -*-
;; FileName : test-enc-utf8.scm
;; About : unit test for UTF-8 string
More information about the uim-commit
mailing list