diff options
Diffstat (limited to 'test/-ext-/string')
-rw-r--r-- | test/-ext-/string/test_cstr.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/-ext-/string/test_cstr.rb b/test/-ext-/string/test_cstr.rb index 9c2b73f695..6f2fdef3d4 100644 --- a/test/-ext-/string/test_cstr.rb +++ b/test/-ext-/string/test_cstr.rb @@ -72,6 +72,20 @@ class Test_StringCStr < Test::Unit::TestCase assert_wchars_term_char("foo!") {|s| s.squeeze!} end + def test_wchar_tr! + assert_wchars_term_char("\u{3042}foobar") {|s| + enc = s.encoding + s.tr!("\u{3042}".encode(enc), "c".encode(enc)) + } + end + + def test_wchar_tr_s! + assert_wchars_term_char("\u{3042}foobar") {|s| + enc = s.encoding + s.tr_s!("\u{3042}".encode(enc), "c".encode(enc)) + } + end + def assert_wchars_term_char(str) result = {} WCHARS.map do |enc| |