[前][次][番号順一覧][スレッド一覧]

ruby-changes:13766

From: nobu <ko1@a...>
Date: Fri, 30 Oct 2009 04:29:01 +0900 (JST)
Subject: [ruby-changes:13766] Ruby:r25562 (trunk): * test/ruby/enc/test_gb18030.rb (test_left_adjust_char_head):

nobu	2009-10-30 04:28:49 +0900 (Fri, 30 Oct 2009)

  New Revision: 25562

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25562

  Log:
    * test/ruby/enc/test_gb18030.rb (test_left_adjust_char_head):
      String#chop no longer raises ArgumentError.

  Modified files:
    trunk/test/ruby/enc/test_gb18030.rb

Index: test/ruby/enc/test_gb18030.rb
===================================================================
--- test/ruby/enc/test_gb18030.rb	(revision 25561)
+++ test/ruby/enc/test_gb18030.rb	(revision 25562)
@@ -28,7 +28,8 @@
   end
 
   def fcheck(c)
-    assert_raise(ArgumentError) { s(c.reverse.join).chop }
+    c = s(c.reverse.join)
+    assert_raise(ArgumentError, c) { c.chop }
   end
 
   def test_left_adjust_char_head
@@ -84,42 +85,42 @@
     scheck([c4], 1)
     scheck([c4, c1], 1)
     scheck([c4, cm], 2)
-    fcheck([c4, cm, c1])
-    fcheck([c4, cm, c4, c1])
+    scheck([c4, cm, c1], 2)
+    scheck([c4, cm, c4, c1], 2)
     scheck([c4, cm, c4, cm], 4)
     scheck([c4, cm, c4, cm, c1], 4)
     scheck([c4, cm, c4, cm, c4], 4)
     scheck([c4, cm, c4, cm, c4, c1], 4)
-    fcheck([c4, cm, c4, cm, c4, cm])
-    fcheck([c4, cm, c4, cm, c4, cm, c1])
-    fcheck([c4, cm, c4, cm, c4, cm, c4])
+    scheck([c4, cm, c4, cm, c4, cm], 2)
+    scheck([c4, cm, c4, cm, c4, cm, c1], 2)
+    scheck([c4, cm, c4, cm, c4, cm, c4], 2)
     scheck([c4, cm, c4, cm, c4, cm, cm, c1], 4)
-    fcheck([c4, cm, c4, cm, c4, cm, cm, cm])
-    fcheck([c4, cm, c4, cm, c4, cm, cm, cm, c1])
+    scheck([c4, cm, c4, cm, c4, cm, cm, cm], 2)
+    scheck([c4, cm, c4, cm, c4, cm, cm, cm, c1], 2)
     scheck([c4, cm, c4, cm, c4, cm, cm, cm, cm], 4)
-    fcheck([c4, cm, c4, cm, cm, c1])
+    scheck([c4, cm, c4, cm, cm, c1], 2)
     scheck([c4, cm, c4, cm, cm, cm], 4)
     scheck([c4, cm, c4, cm, cm, cm, c1], 4)
-    fcheck([c4, cm, c4, cm, cm, cm, cm])
+    scheck([c4, cm, c4, cm, cm, cm, cm], 2)
     scheck([c4, cm, cm], 1)
     scheck([cm], 1)
-    fcheck([cm, c1])
-    fcheck([cm, c4, c1])
+    scheck([cm, c1], 1)
+    scheck([cm, c4, c1], 1)
     scheck([cm, c4, cm], 3)
-    fcheck([cm, c4, cm, c1])
-    fcheck([cm, c4, cm, c4])
-    fcheck([cm, c4, cm, c4, c1])
-    fcheck([cm, c4, cm, c4, cm])
-    fcheck([cm, c4, cm, c4, cm, c1])
-    fcheck([cm, c4, cm, c4, cm, c4])
-    fcheck([cm, c4, cm, c4, cm, cm, c1])
-    fcheck([cm, c4, cm, c4, cm, cm, cm])
-    fcheck([cm, c4, cm, c4, cm, cm, cm, c1])
-    fcheck([cm, c4, cm, c4, cm, cm, cm, cm])
-    fcheck([cm, c4, cm, cm, c1])
-    fcheck([cm, c4, cm, cm, cm])
-    fcheck([cm, c4, cm, cm, cm, c1])
-    fcheck([cm, c4, cm, cm, cm, cm])
+    scheck([cm, c4, cm, c1], 3)
+    scheck([cm, c4, cm, c4], 3)
+    scheck([cm, c4, cm, c4, c1], 3)
+    scheck([cm, c4, cm, c4, cm], 1)
+    scheck([cm, c4, cm, c4, cm, c1], 1)
+    scheck([cm, c4, cm, c4, cm, c4], 1)
+    scheck([cm, c4, cm, c4, cm, cm, c1], 3)
+    scheck([cm, c4, cm, c4, cm, cm, cm], 1)
+    scheck([cm, c4, cm, c4, cm, cm, cm, c1], 1)
+    scheck([cm, c4, cm, c4, cm, cm, cm, cm], 3)
+    scheck([cm, c4, cm, cm, c1], 1)
+    scheck([cm, c4, cm, cm, cm], 3)
+    scheck([cm, c4, cm, cm, cm, c1], 3)
+    scheck([cm, c4, cm, cm, cm, cm], 1)
     scheck([cm, cm], 2)
   end
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]