diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-31 07:37:10 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-31 07:37:10 +0000 |
commit | d1429c3cc6405a23b10c317c0ffdac96c9a7e61f (patch) | |
tree | 74a2d2d55e5a6fc3f209f786929429a6040da438 /test/ruby | |
parent | ae9af4d3337c7ad82eff221028c1d58b5f44f659 (diff) | |
download | ruby-d1429c3cc6405a23b10c317c0ffdac96c9a7e61f.tar.gz |
* enc/trans/single_byte.trans (us_ascii_map): don't define 8bit bytes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_econv.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index 917b46c629..a704b05ed0 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -613,4 +613,19 @@ class TestEncodingConverter < Test::Unit::TestCase assert_kind_of(Encoding::InvalidByteSequence, ec.last_error) end + def test_us_ascii + ec = Encoding::Converter.new("UTF-8", "US-ASCII") + ec.primitive_convert(src="\u{3042}", dst="") + err = ec.last_error + assert_kind_of(Encoding::ConversionUndefined, err) + assert_equal("\u{3042}", err.error_char) + end + + def test_88591 + ec = Encoding::Converter.new("UTF-8", "ISO-8859-1") + ec.primitive_convert(src="\u{3042}", dst="") + err = ec.last_error + assert_kind_of(Encoding::ConversionUndefined, err) + assert_equal("\u{3042}", err.error_char) + end end |