diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_m17n.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index f923173e5a..542c3d2b00 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -483,4 +483,10 @@ class TestM17N < Test::Unit::TestCase assert_raise(SyntaxError) { eval(s(%{/\\u{6666}#{}\\xc2\\xa0/})) } assert_nothing_raised { eval(u(%{/\\u{6666}#{}\\xc2\\xa0/})) } end + + def test_tr + s = "\x81\x41".force_encoding("shift_jis") + assert_equal(s.tr("A", "B"), s) + assert_equal(s.tr_s("A", "B"), s) + end end |