diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-06 02:17:18 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-06 02:17:18 +0000 |
commit | ebe7d94ca685ce8998ccc14bf59d3219bb9920d0 (patch) | |
tree | 96aca312d72f0ff0c510c73106556b2e46198852 /test/ruby/test_m17n.rb | |
parent | 84a92191e3eb797aab7d625a8ad481277d9a16d8 (diff) | |
download | ruby-ebe7d94ca685ce8998ccc14bf59d3219bb9920d0.tar.gz |
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r-- | test/ruby/test_m17n.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 5d5b183c67..590b22f18f 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -721,6 +721,13 @@ class TestM17N < Test::Unit::TestCase s = "abc".force_encoding(Encoding::ASCII_8BIT) t = s.gsub(/b/, "\xa1\xa1".force_encoding("euc-jp")) assert_equal(Encoding::ASCII_8BIT, s.encoding) + + assert_raise(ArgumentError) { + "abc".gsub(/[ac]/) { + $& == "a" ? "\xc2\xa1".force_encoding("euc-jp") : + "\xc2\xa1".force_encoding("utf-8") + } + } end def test_regexp_match |