1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/rexml/test_document.rb: Fix tests that expect encoding name

isn't normalized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2012-11-03 04:58:03 +00:00
parent c420f8449e
commit 82aef2ae50
2 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Sat Nov 3 13:46:49 2012 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_document.rb: Fix tests that expect encoding name
isn't normalized.
Sat Nov 3 13:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
* dir.c (Dir#glob):

View file

@ -167,13 +167,12 @@ EOX
ie_hack = false
encoding = "Windows-31J"
xml_declaration_encoding = "Shift_JIS"
@document.xml_decl.encoding = xml_declaration_encoding
@document.xml_decl.encoding = "Shift_JIS"
japanese_text = "こんにちは"
@document.root.text = japanese_text
@document.write(output, indent, transitive, ie_hack, encoding)
assert_equal(<<-EOX.encode(encoding), output)
<?xml version='1.0' encoding='#{xml_declaration_encoding}'?>
<?xml version='1.0' encoding='SHIFT_JIS'?>
<message>#{japanese_text}</message>
EOX
end
@ -221,13 +220,12 @@ EOX
def test_encoding
output = ""
encoding = "Windows-31J"
xml_declaration_encoding = "Shift_JIS"
@document.xml_decl.encoding = xml_declaration_encoding
@document.xml_decl.encoding = "Shift_JIS"
japanese_text = "こんにちは"
@document.root.text = japanese_text
@document.write(:output => output, :encoding => encoding)
assert_equal(<<-EOX.encode(encoding), output)
<?xml version='1.0' encoding='#{xml_declaration_encoding}'?>
<?xml version='1.0' encoding='SHIFT_JIS'?>
<message>#{japanese_text}</message>
EOX
end