diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-15 16:41:16 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-15 16:41:16 +0000 |
commit | c3d0206e04c36eaca9853132fd687264b8b7348f (patch) | |
tree | 553d194d81c1dc2e9db70c34c6d039bbaa9b8445 | |
parent | 3a427c61997b513939841dfa1f7b124e9facf6d3 (diff) | |
download | ruby-c3d0206e04c36eaca9853132fd687264b8b7348f.tar.gz |
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_econv.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index 5194983b8a..8ac4013218 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -398,5 +398,13 @@ class TestEncodingConverter < Test::Unit::TestCase assert_equal(true, ec.primitive_output("\u3042", dst)) assert_equal("\e$B!!\e(B???\e$B!\"\e(B\e$B!!\e(B\e$B!\#\e(B\e$B$\"\e(B".force_encoding("ISO-2022-JP"), dst) + + assert_raise(Encoding::ConversionUndefined) { + ec.primitive_output("\uFFFD", dst) + } + + assert_equal("\e$B!!\e(B???\e$B!\"\e(B\e$B!!\e(B\e$B!\#\e(B\e$B$\"\e(B".force_encoding("ISO-2022-JP"), dst) end + + end |