summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rexml/test_encoding.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/rexml/test_encoding.rb b/test/rexml/test_encoding.rb
index 9a41957faf..058fb974b2 100644
--- a/test/rexml/test_encoding.rb
+++ b/test/rexml/test_encoding.rb
@@ -94,5 +94,14 @@ module REXMLTests
assert_equal("UTF-16", utf16.encoding)
assert( utf16[0].kind_of?(REXML::XMLDecl))
end
+
+ def test_parse_utf16_with_utf8_default_internal
+ EnvUtil.with_default_internal("UTF-8") do
+ utf16 = File.open(fixture_path("utf16.xml")) do |f|
+ REXML::Document.new(f)
+ end
+ assert_equal("UTF-16", utf16.encoding)
+ end
+ end
end
end