From 8dfa6fb0a80d633d71987f06462823ca13b67be8 Mon Sep 17 00:00:00 2001 From: kou Date: Wed, 7 Apr 2004 03:36:38 +0000 Subject: * lib/rss/parser.rb, lib/rss/1.0.rb: accepted rdf:resource or resource attribute in rdf:li. * test/rss/test_parser.rb: added test for above change. * lib/rss/dublincore.rb: reverted style. * lib/rss/xmlparser.rb: normalized XMLParser class hierarchy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rss/test_parser.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'test') diff --git a/test/rss/test_parser.rb b/test/rss/test_parser.rb index 461d64d612..05ff9748ad 100644 --- a/test/rss/test_parser.rb +++ b/test/rss/test_parser.rb @@ -219,6 +219,37 @@ EOR end + def test_rdf_li + + rss = make_RDF(<<-EOR) + + hoge + http://example.com/ + hogehoge + + + + + + + + +#{make_item} +EOR + + source = Proc.new do |rdf_li_attr| + eval(%Q[%Q[#{rss}]], binding) + end + + attr = %q[resource="http://example.com/hoge"] + assert_parse(source.call(attr), :nothing_raised) + + attr = %q[rdf:resource="http://example.com/hoge"] + assert_parse(source.call(attr), :nothing_raised) + + assert_parse(source.call(""), :missing_attribute, "li", "resource") + end + def test_image assert_parse(make_RDF(<<-EOR), :missing_attribute, "image", "about") -- cgit v1.2.3