From c3d0206e04c36eaca9853132fd687264b8b7348f Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 15 Aug 2008 16:41:16 +0000 Subject: [PATCH] add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_econv.rb | 8 ++++++++ 1 file changed, 8 insertions(+) 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