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