summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-29 01:36:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-29 01:36:26 +0000
commitb62936e1904a448ba12fdcf54e33ccc1501df885 (patch)
tree8645dc83703a8ffb11bc4930c6caad593405f9b6 /test
parente924a2b8ea4782010598cebd8c1a27d7b92ed941 (diff)
downloadruby-b62936e1904a448ba12fdcf54e33ccc1501df885.tar.gz
ruby-b62936e1904a448ba12fdcf54e33ccc1501df885.tar.xz
ruby-b62936e1904a448ba12fdcf54e33ccc1501df885.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@26193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rexml/test_document.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb
index a35fce7dc..1ee1a1d41 100644
--- a/test/rexml/test_document.rb
+++ b/test/rexml/test_document.rb
@@ -82,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('<?xml version="1.0" standalone="no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ doc = REXML::Document.new('<?xml version="1.0" standalone= "no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ doc = REXML::Document.new('<?xml version="1.0" standalone= "no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ end
end