mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a7d3c7bcf2
commit
870a8b3903
1 changed files with 2 additions and 0 deletions
|
@ -546,6 +546,7 @@ class TestTranscode < Test::Unit::TestCase
|
|||
check_both_ways("\u005C", "\x5C", "eucJP-ms")
|
||||
check_both_ways("\u005C", "\x5C", "CP51932")
|
||||
check_both_ways("\u005C", "\x5C", "ISO-2022-JP")
|
||||
assert_equal("\u005C", "\e(B\x5C\e(B".encode("UTF-8", "ISO-2022-JP"))
|
||||
assert_equal("\u005C", "\e(J\x5C\e(B".encode("UTF-8", "ISO-2022-JP"))
|
||||
assert_raise(Encoding::ConversionUndefined) { "\u00A5".encode("Shift_JIS") }
|
||||
assert_raise(Encoding::ConversionUndefined) { "\u00A5".encode("Windows-31J") }
|
||||
|
@ -568,6 +569,7 @@ class TestTranscode < Test::Unit::TestCase
|
|||
check_both_ways("\u007E", "\x7E", "eucJP-ms")
|
||||
check_both_ways("\u007E", "\x7E", "CP51932")
|
||||
check_both_ways("\u007E", "\x7E", "ISO-2022-JP")
|
||||
assert_equal("\u007E", "\e(B\x7E\e(B".encode("UTF-8", "ISO-2022-JP"))
|
||||
assert_equal("\u007E", "\e(J\x7E\e(B".encode("UTF-8", "ISO-2022-JP"))
|
||||
assert_raise(Encoding::ConversionUndefined) { "\u203E".encode("Shift_JIS") }
|
||||
assert_raise(Encoding::ConversionUndefined) { "\u203E".encode("Windows-31J") }
|
||||
|
|
Loading…
Reference in a new issue