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

* lib/rss/parser.rb: added entity handling type predicate.

* lib/rss/rexmlparser.rb: ditto.
* lib/rss/xmlparser.rb: ditto.
* lib/rss/xmlscanner.rb: ditto.

* lib/rss/xmlscanner.rb: more robust entity handling.

* test/rss/test_parser.rb: added an entity handling test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2005-11-23 13:35:11 +00:00
parent 4b87fa9de2
commit 93402a2f17
6 changed files with 80 additions and 19 deletions

View file

@ -122,7 +122,20 @@ EOR
end
assert_parse(rss, :nothing_raised)
end
end
def test_undefined_entity
return unless RSS::Parser.default_parser.raise_for_undefined_entity?
assert_parse(make_RDF(<<-EOR), :raises, RSS::NotWellFormedError)
#{make_channel}
#{make_image}
<item rdf:about="#{RDF_ABOUT}">
<title>#{TITLE_VALUE} &UNKNOWN_ENTITY;</title>
<link>#{LINK_VALUE}</link>
<description>#{DESCRIPTION_VALUE}</description>
</item>
#{make_textinput}
EOR
end
def test_channel