summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-28 21:40:59 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-28 21:40:59 +0000
commit197eea3404169141abd79d6edcd38291d8aa983b (patch)
tree259042e7c26d2f100881ec4db7eaf68e9909f91a /test
parentd05112b942c5bbdcbb71201e6c209676f2da7915 (diff)
* lib/rexml/formatters/default.rb (write_attribute): fix an
exception when printing a document when duplicate namespaced attributes exist. Thanks, Alexey Froloff [ruby-core:2389] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rexml/test_document.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb
index 0261e80b74..a35fce7dca 100644
--- a/test/rexml/test_document.rb
+++ b/test/rexml/test_document.rb
@@ -2,6 +2,25 @@ require "rexml/document"
require "test/unit"
class REXML::TestDocument < Test::Unit::TestCase
+ def test_version_attributes_to_s
+ doc = REXML::Document.new(<<-eoxml)
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+ <svg id="svg2"
+ xmlns:sodipodi="foo"
+ xmlns:inkscape="bar"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ >
+ </svg>
+ eoxml
+
+ string = doc.to_s
+ assert_match('xmlns:sodipodi', string)
+ assert_match('xmlns:inkscape', string)
+ assert_match('sodipodi:version', string)
+ assert_match('inkscape:version', string)
+ end
+
def test_new
doc = REXML::Document.new(<<EOF)
<?xml version="1.0" encoding="UTF-8"?>