diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-29 19:28:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-29 19:28:49 +0000 |
commit | 0eee66f7f6326642052192ebdc56743836c02499 (patch) | |
tree | d5175afaec7949e24ecaa095d7b24bdaabeee6e9 /test/ruby | |
parent | 5001a5b6aa6522bf7f2ded109eeb3e6212adb89e (diff) | |
download | ruby-0eee66f7f6326642052192ebdc56743836c02499.tar.gz ruby-0eee66f7f6326642052192ebdc56743836c02499.tar.xz ruby-0eee66f7f6326642052192ebdc56743836c02499.zip |
* test/ruby/enc/test_gb18030.rb (test_left_adjust_char_head):
String#chop no longer raises ArgumentError.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/enc/test_gb18030.rb | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/test/ruby/enc/test_gb18030.rb b/test/ruby/enc/test_gb18030.rb index a33a9eb28..f379504d4 100644 --- a/test/ruby/enc/test_gb18030.rb +++ b/test/ruby/enc/test_gb18030.rb @@ -28,7 +28,8 @@ class TestGB18030 < Test::Unit::TestCase 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 @@ class TestGB18030 < Test::Unit::TestCase 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 |