diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 14:57:04 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 14:57:04 +0000 |
| commit | a7862b65c945650dced50e593485b2f9a8250ad8 (patch) | |
| tree | d6f7576aa18de39832d6f4c34da537a0188cdf90 /test | |
| parent | 88d156a8cad2915d9af1cf57b8eb03be70dd826f (diff) | |
| download | ruby-a7862b65c945650dced50e593485b2f9a8250ad8.tar.gz ruby-a7862b65c945650dced50e593485b2f9a8250ad8.tar.xz ruby-a7862b65c945650dced50e593485b2f9a8250ad8.zip | |
* test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_chomp): test
updated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_m17n_comb.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb index b3a5bfdc5..a3dcde328 100644 --- a/test/ruby/test_m17n_comb.rb +++ b/test/ruby/test_m17n_comb.rb @@ -720,8 +720,10 @@ class TestM17NComb < Test::Unit::TestCase def test_str_chomp combination(STRINGS, STRINGS) {|s1, s2| - if !s1.ascii_only? && !s2.ascii_only? && s1.encoding != s2.encoding - assert_raise(ArgumentError) { s1.chomp(s2) } + if !s1.ascii_only? && !s2.ascii_only? && !Encoding.compatible?(s1,s2) + if s1.bytesize > s2.bytesize + assert_raise(ArgumentError) { s1.chomp(s2) } + end next end t = enccall(s1, :chomp, s2) @@ -1425,6 +1427,7 @@ class TestM17NComb < Test::Unit::TestCase assert_equal(s1, doit.call) next end + assert(false, "test broken") if !str_enc_compatible?(s1.gsub(r2, ''), s3) assert_raise(ArgumentError, desc) { doit.call } next @@ -1479,6 +1482,7 @@ class TestM17NComb < Test::Unit::TestCase assert_equal([s1, nil], doit.call) next end + assert(false, "test broken") if !str_enc_compatible?(s1.gsub(r2, ''), s3) assert_raise(ArgumentError, desc) { doit.call } next |
