summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-18 15:49:29 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-18 15:49:29 +0000
commit478cdf49d7fcca58de301637dba598d2da69ef3e (patch)
treee6059d88ca13119d3a6704c56735714503f33c84 /test
parentbd210ff16425ab92aef0ca4ac5a28061fac7c154 (diff)
merge revision(s) 52016,52017,52019,52020,52021: [Backport #10735]
* enc/euc_jp.c (mbc_case_fold): check given string is valid or not, and if invalid, return 1. [Bug #11486] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@52652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_m17n_comb.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb
index 3a37ed4a23..83c3f8aa95 100644
--- a/test/ruby/test_m17n_comb.rb
+++ b/test/ruby/test_m17n_comb.rb
@@ -1635,4 +1635,9 @@ class TestM17NComb < Test::Unit::TestCase
}
end
+ def test_bug11486
+ bug11486 = '[Bug #11486]'
+ assert_nil ("\u3042"*19+"\r"*19+"\u3042"*20+"\r"*20).encode(Encoding::EUC_JP).gsub!(/xxx/i, ""), bug11486
+ assert_match Regexp.new("ABC\uff41".encode(Encoding::EUC_JP), Regexp::IGNORECASE), "abc\uFF21".encode(Encoding::EUC_JP), bug11486
+ end
end