From 21ebe83f54586e06d77064b702bfeb5598cd2091 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 29 Dec 2009 01:36:26 +0000 Subject: * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE): any number spaces can be placed between equal-sign and the value. patch from Ed Howland in [ruby-core:27345]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rexml/test_document.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'test') diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb index 0261e80b74..1ee1a1d414 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) + + + + 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(< @@ -63,4 +82,14 @@ EOF ensure REXML::Document.entity_expansion_limit = 10000 end + + def test_xml_declaration_standalone + bug2539 = '[ruby-core:27345]' + doc = REXML::Document.new('') + assert_equal('no', doc.stand_alone?, bug2539) + doc = REXML::Document.new('') + assert_equal('no', doc.stand_alone?, bug2539) + doc = REXML::Document.new('') + assert_equal('no', doc.stand_alone?, bug2539) + end end -- cgit v1.2.3