summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-15 16:41:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-15 16:41:16 +0000
commit20c04c673e4775bd8b4d64ea257bc8c0a0a33600 (patch)
tree553d194d81c1dc2e9db70c34c6d039bbaa9b8445 /test/ruby
parente5c5ddf934d37317a9dfad4a72e20ee537b9bef3 (diff)
downloadruby-20c04c673e4775bd8b4d64ea257bc8c0a0a33600.tar.gz
ruby-20c04c673e4775bd8b4d64ea257bc8c0a0a33600.tar.xz
ruby-20c04c673e4775bd8b4d64ea257bc8c0a0a33600.zip
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_econv.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index 5194983b8..8ac401321 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