* test/rexml/test_encoding.rb (EncodingTester#test_in_different_out):

Fix a test that expects encoding in XML declaration is changed by
  Output's encoding. It is dropped feature.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2012-11-03 04:03:55 +00:00
Родитель 9c606a0a4c
Коммит dbfb5deab6
2 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Sat Nov 3 13:01:02 2012 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_encoding.rb (EncodingTester#test_in_different_out):
Fix a test that expects encoding in XML declaration is changed by
Output's encoding. It is dropped feature.
Sat Nov 3 12:54:13 2012 Kouhei Sutou <kou@cozmixng.org> Sat Nov 3 12:54:13 2012 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_core.rb (Tester#test_ticket_88): Follow the * test/rexml/test_core.rb (Tester#test_ticket_88): Follow the

Просмотреть файл

@ -10,8 +10,9 @@ class EncodingTester < Test::Unit::TestCase
include REXML include REXML
def setup def setup
@encoded_root = "<a><b>\346</b></a>"
@encoded = "<?xml version='1.0' encoding='ISO-8859-3'?>"+ @encoded = "<?xml version='1.0' encoding='ISO-8859-3'?>"+
"<a><b>\346</b></a>" @encoded_root
@not_encoded = "<a><b>ĉ</b></a>" @not_encoded = "<a><b>ĉ</b></a>"
end end
@ -59,7 +60,7 @@ class EncodingTester < Test::Unit::TestCase
doc = Document.new( @not_encoded ) doc = Document.new( @not_encoded )
doc.write( Output.new( out="", "ISO-8859-3" ) ) doc.write( Output.new( out="", "ISO-8859-3" ) )
out.force_encoding(::Encoding::ASCII_8BIT) out.force_encoding(::Encoding::ASCII_8BIT)
assert_equal( @encoded, out ) assert_equal( "<?xml version='1.0'?>#{@encoded_root}", out )
end end
# * Given an encoded document, accessing text and attribute nodes # * Given an encoded document, accessing text and attribute nodes