diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_string.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index a0fb80f46e..4d9f7d95b0 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1998,6 +1998,9 @@ class TestString < Test::Unit::TestCase s = S("a:".force_encoding(enc)) assert_equal([enc]*3, s.partition("|").map(&:encoding), bug6206) end + + assert_equal(["\u30E6\u30FC\u30B6", "@", "\u30C9\u30E1.\u30A4\u30F3"], + "\u30E6\u30FC\u30B6@\u30C9\u30E1.\u30A4\u30F3".partition(/[@.]/)) end def test_rpartition @@ -2013,6 +2016,10 @@ class TestString < Test::Unit::TestCase s = S("a:".force_encoding(enc)) assert_equal([enc]*3, s.rpartition("|").map(&:encoding), bug6206) end + + bug8138 = '[ruby-dev:47183]' + assert_equal(["\u30E6\u30FC\u30B6@\u30C9\u30E1", ".", "\u30A4\u30F3"], + "\u30E6\u30FC\u30B6@\u30C9\u30E1.\u30A4\u30F3".rpartition(/[@.]/), bug8138) end def test_setter |