summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 00:51:31 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 00:51:31 +0000
commit88dd1e4c993e661b0d52c40d0eff567b00bf6ffd (patch)
treee8298605f2f0e29f2ec2befeda793b46194e4ddd /test
parente85f8c782958c0a3e6ea296401a08d5fe9f8e550 (diff)
* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* 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/branches/ruby_1_8@10295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rss/test_parser.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/rss/test_parser.rb b/test/rss/test_parser.rb
index adf0864d19..d6de0699a0 100644
--- a/test/rss/test_parser.rb
+++ b/test/rss/test_parser.rb
@@ -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