adapt to unix filename
[chise/ruby.git] / t / tc_str.rb
index 4cddd0d..8af1756 100755 (executable)
@@ -23,9 +23,13 @@ class TC_String < Test::Unit::TestCase
   end
   def test_attributes
     assert_equal(23383, "字".ucs)
-    assert_equal(23383, "字字".ucs)
+    assert_raises(NameError, message=""){
+      assert_equal(23383, "字字".ucs) #エラーが発生する
+    }
     assert_equal(25991, "文".ucs)
-    assert_equal(25991, @str.ucs)
+    assert_raises(NameError, message=""){
+      assert_equal(25991, @str.ucs) #エラーが発生する
+    }
   end
   def test_er
     @char = @str.char_at(1)
@@ -74,17 +78,21 @@ class TC_String < Test::Unit::TestCase
 
     ins = "字".inspect_all
 #    assert_match(/^<字,J90-3B7A,/, ins)
-    assert_match(/chinese-big5:42610/, ins)
-    assert_match(/chinese-cns11643-1:18291/, ins)
-    assert_match(/chinese-gb2312:22358/, ins)
-    assert_match(/chinese-isoir165:22358/, ins)
-    assert_match(/ideograph-daikanwa:6942/, ins)
+    assert_match(/^<字,#x5b57,/, ins)
+    assert_match(/=big5:42610/, ins)
+    assert_match(/=cns11643-1:18291/, ins)
+    assert_match(/=gb2312:22358/, ins)
+    assert_match(/=daikanwa:6942/, ins)
     assert_match(/ideographic-radical:39/, ins)
     assert_match(/ideographic-strokes:3/, ins)
-    assert_match(/korean-ksc5601:27950/, ins)
+    assert_match(/=ks-x1001:27950/, ins)
     assert_match(/shinjigen-2:1777/, ins)
     assert_match(/total-strokes:6/, ins)
-    assert_match(/ucs:23383/, ins)
+    assert_match(/=ucs:23383/, ins)
+    assert_match(/=gt:8734/, ins)
+    assert_match(/=gt-k:1624/, ins)
+    assert_match(/=gt-pj-1:15226/, ins)
+    assert_match(/=jis-x0208:15226/, ins)
   end
 end