summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-13 04:45:56 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-13 04:45:56 +0000
commitca0a380937a557c6d43e8d83036d97457a84333d (patch)
treee3a60ab7188f4decd0af573b4513e3ef4bdc5109 /test
parentcc13809bbb603785b4589cf0cd8bae0d036b816b (diff)
downloadruby-ca0a380937a557c6d43e8d83036d97457a84333d.tar.gz
ruby-ca0a380937a557c6d43e8d83036d97457a84333d.tar.xz
ruby-ca0a380937a557c6d43e8d83036d97457a84333d.zip
* test/ruby/test_m17n_comb.rb: feature changed in r20626.
follows it. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_m17n_comb.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb
index b5208f44f..7d6794292 100644
--- a/test/ruby/test_m17n_comb.rb
+++ b/test/ruby/test_m17n_comb.rb
@@ -1099,7 +1099,11 @@ class TestM17NComb < Test::Unit::TestCase
next
end
if !s1.ascii_only? && !s2.ascii_only? && s1.encoding != s2.encoding
- assert_raise(ArgumentError) { s1.scan(s2) }
+ if s1.valid_encoding?
+ assert_raise(Encoding::CompatibilityError) { s1.scan(s2) }
+ else
+ assert_raise(ArgumentError, /invalid byte sequence/) { s1.scan(s2) }
+ end
next
end
if !s1.valid_encoding?
@@ -1418,7 +1422,7 @@ class TestM17NComb < Test::Unit::TestCase
next
end
if !str_enc_compatible?(s1, s2)
- assert_raise(ArgumentError, desc) { doit.call }
+ assert_raise(Encoding::CompatibilityError, desc) { doit.call }
next
end
if !enccall(s1, :include?, s2)
@@ -1476,7 +1480,7 @@ class TestM17NComb < Test::Unit::TestCase
next
end
if !str_enc_compatible?(s1, s2)
- assert_raise(ArgumentError, desc) { doit.call }
+ assert_raise(Encoding::CompatibilityError, desc) { doit.call }
next
end
if !enccall(s1, :include?, s2)