summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-08 17:23:37 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-08 17:23:37 +0000
commitbfe5f25dc7f31fad380de6d574416c2da21d4973 (patch)
tree7fae9b9730c10df6ec5027e3d59529fab9dc6132 /test
parent1499514166ede57c656a22d4682e25aee4873e59 (diff)
downloadruby-bfe5f25dc7f31fad380de6d574416c2da21d4973.tar.gz
ruby-bfe5f25dc7f31fad380de6d574416c2da21d4973.tar.xz
ruby-bfe5f25dc7f31fad380de6d574416c2da21d4973.zip
* include/ruby/encoding.h (rb_econv_decorate_at_first): declared.
(rb_econv_decorate_at_last): declared. * transcode.c (rb_econv_open_by_transcoder_entries): initialize replacement_enc. allocate outbuf for the last transcoder. (rb_econv_open0): extracted from rb_econv_open. (rb_econv_open): use rb_econv_open0 and decorate the result using rb_econv_decorate_at_first and rb_econv_decorate_at_last. (rb_econv_decorate_at): new function. (rb_econv_decorate_at_first): ditto. (rb_econv_decorate_at_last): ditto. (rb_econv_binmode): fix iteration end condition. (econv_init): don't set source_encoding_name and destination_encoding_name because they are set in rb_econv_open0. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_econv.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index 1b2586a04..a82105a3f 100644
--- a/test/ruby/test_econv.rb
+++ b/test/ruby/test_econv.rb
@@ -68,13 +68,13 @@ class TestEncodingConverter < Test::Unit::TestCase
end
def test_newline_converter_with_ascii_incompatible
- assert_raise(Encoding::NoConverter) {
+ assert_nothing_raised {
Encoding::Converter.new("UTF-8", "UTF-16BE", Encoding::Converter::UNIVERSAL_NEWLINE_DECODER)
}
- assert_raise(Encoding::NoConverter) {
+ assert_nothing_raised {
Encoding::Converter.new("UTF-16BE", "UTF-8", Encoding::Converter::CRLF_NEWLINE_ENCODER)
}
- assert_raise(Encoding::NoConverter) {
+ assert_nothing_raised {
Encoding::Converter.new("UTF-16BE", "UTF-8", Encoding::Converter::CR_NEWLINE_ENCODER)
}