diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-28 17:13:49 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-28 17:13:49 +0000 |
commit | 3811bb53bdc604ec6abe1252787c3fb381a711d6 (patch) | |
tree | a4b78cdd67db724a935501dd5473e7cd94fa6348 /test | |
parent | 63846d48a9b2044ad2fb3062ca8551de078d3508 (diff) | |
download | ruby-3811bb53bdc604ec6abe1252787c3fb381a711d6.tar.gz |
* transcode.c (econv_primitive_convert): accept nil as input for empty
input.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_econv.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index 5324e6dfe2..bc22da567d 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -79,6 +79,12 @@ class TestEncodingConverter < Test::Unit::TestCase } end + def test_nil_input + ec = Encoding::Converter.new("UTF-8", "EUC-JP") + ret = ec.primitive_convert(nil, dst="", nil, 10) + assert_equal(:finished, ret) + end + def test_partial_input ec = Encoding::Converter.new("UTF-8", "EUC-JP") ret = ec.primitive_convert(src="", dst="", nil, 10, Encoding::Converter::PARTIAL_INPUT) |