add some tests from the python feedparser page - sfeed_tests - sfeed tests and RSS and Atom files
(HTM) git clone git://git.codemadness.org/sfeed_tests
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 43ebbd6f886a5fa96887e88f119341aeb9248727
(DIR) parent 4501b050d4853caaff6dc697cb0382496ffb4b9d
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 29 Sep 2025 19:03:49 +0200
add some tests from the python feedparser page
https://feedparser.readthedocs.io/en/latest/annotated-examples/
Fix: with unicode ” replaced with ".
Diffstat:
A input/sfeed/realworld/feedparser_a… | 67 +++++++++++++++++++++++++++++++
A input/sfeed/realworld/feedparser_a… | 68 +++++++++++++++++++++++++++++++
A input/sfeed/realworld/feedparser_r… | 37 +++++++++++++++++++++++++++++++
A input/sfeed/realworld/feedparser_r… | 49 +++++++++++++++++++++++++++++++
A input/sfeed/realworld/feedparser_r… | 33 +++++++++++++++++++++++++++++++
5 files changed, 254 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/input/sfeed/realworld/feedparser_atom03_annotated.xml b/input/sfeed/realworld/feedparser_atom03_annotated.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed version="0.3"
+xmlns="http://purl.org/atom/ns#"
+xml:base="http://example.org/"
+xml:lang="en">
+<title type="text/plain" mode="escaped">
+Sample Feed
+</title>
+<tagline type="text/html" mode="escaped">
+For documentation <em>only</em>
+</tagline>
+<link rel="alternate"
+type="text/html"
+href="/"/>
+<copyright type="text/html" mode="escaped">
+<p>Copyright 2004, Mark Pilgrim</p><
+</copyright>
+<generator url="http://example.org/generator/" version="3.0">
+Sample Toolkit
+</generator>
+<id>tag:feedparser.org,2004-04-20:/docs/examples/atom03.xml</id>
+<modified>2004-04-20T11:56:34Z</modified>
+<info type="application/xhtml+xml" mode="xml">
+<div xmlns="http://www.w3.org/1999/xhtml"><p>This is an Atom syndication feed.</p></div>
+</info>
+<entry>
+<title>First entry title</title>
+<link rel="alternate"
+type="text/html"
+href="/entry/3"/>
+<link rel="service.edit"
+type="application/atom+xml"
+title="Atom API entrypoint to edit this entry"
+href="/api/edit/3"/>
+<link rel="service.post"
+type="application/atom+xml"
+title="Atom API entrypoint to add comments to this entry"
+href="/api/comment/3"/>
+<id>tag:feedparser.org,2004-04-20:/docs/examples/atom03.xml:3</id>
+<created>2004-04-19T07:45:00Z</created>
+<issued>2004-04-20T00:23:47Z</issued>
+<modified>2004-04-20T11:56:34Z</modified>
+<author>
+<name>Mark Pilgrim</name>
+<url>http://diveintomark.org/</url>
+<email>mark@example.org</email>
+</author>
+<contributor>
+<name>Joe</name>
+<url>http://example.org/joe/</url>
+<email>joe@example.org</email>
+</contributor>
+<contributor>
+<name>Sam</name>
+<url>http://example.org/sam/</url>
+<email>sam@example.org</email>
+</contributor>
+<summary type="text/plain" mode="escaped">
+Watch out for nasty tricks
+</summary>
+<content type="application/xhtml+xml" mode="xml"
+xml:base="http://example.org/entry/3"
+xml:lang="en-US">
+<div xmlns="http://www.w3.org/1999/xhtml">Watch out for <span style="background-image: url(javascript:window.location=’http://example.org/’)"> nasty tricks</span></div>
+</content>
+</entry>
+</feed>
(DIR) diff --git a/input/sfeed/realworld/feedparser_atom10_annotated.xml b/input/sfeed/realworld/feedparser_atom10_annotated.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom"
+xml:base="http://example.org/"
+xml:lang="en">
+<title type="text">
+Sample Feed
+</title>
+<subtitle type="html">
+For documentation <em>only</em>
+</subtitle>
+<link rel="alternate"
+type="html"
+href="/"/>
+<link rel="self"
+type="application/atom+xml"
+href="http://www.example.org/atom10.xml"/>
+<rights type="html">
+<p>Copyright 2005, Mark Pilgrim</p>
+</rights>
+<generator uri="http://example.org/generator/"
+version="4.0">
+Sample Toolkit
+</generator>
+<id>tag:feedparser.org,2005-11-09:/docs/examples/atom10.xml</id>
+<updated>2005-11-09T11:56:34Z</updated>
+<entry>
+<title>First entry title</title>
+<link rel="alternate"
+href="/entry/3"/>
+<link rel="related"
+type="text/html"
+href="http://search.example.com/"/>
+<link rel="via"
+type="text/html"
+href="http://toby.example.com/examples/atom10"/>
+<link rel="enclosure"
+type="video/mpeg4"
+href="http://www.example.com/movie.mp4"
+length="42301"/>
+<id>tag:feedparser.org,2005-11-09:/docs/examples/atom10.xml:3</id>
+<published>2005-11-09T00:23:47Z</published>
+<updated>2005-11-09T11:56:34Z</updated>
+<author>
+<name>Mark Pilgrim</name>
+<uri>http://diveintomark.org/</uri>
+<email>mark@example.org</email>
+</author>
+<contributor>
+<name>Joe</name>
+<url>http://example.org/joe/</url>
+<email>joe@example.org</email>
+</contributor>
+<contributor>
+<name>Sam</name>
+<url>http://example.org/sam/</url>
+<email>sam@example.org</email>
+</contributor>
+<summary type="text">
+Watch out for nasty tricks
+</summary>
+<content type="xhtml"
+xml:base="http://example.org/entry/3"
+xml:lang="en-US"><div xmlns="http://www.w3.org/1999/xhtml">Watch out for
+<span style="background-image: url(javascript:window.location=’http://example.org/’)">
+nasty tricks</span></div>
+</content>
+</entry>
+</feed>
(DIR) diff --git a/input/sfeed/realworld/feedparser_rss10_annotated.xml b/input/sfeed/realworld/feedparser_rss10_annotated.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+xmlns:dc="http://purl.org/dc/elements/1.1/"
+xmlns:admin="http://webns.net/mvcb/"
+xmlns:content="http://purl.org/rss/1.0/modules/content/"
+xmlns:cc="http://web.resource.org/cc/"
+xmlns="http://purl.org/rss/1.0/">
+<channel rdf:about="http://www.example.org/index.rdf">
+<title>Sample Feed</title>
+<link>http://www.example.org/</link>
+<description>For documentation only</description>
+<dc:language>en</dc:language>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:creator>Mark Pilgrim (mark@example.org)</dc:creator>
+<dc:date>2004-06-04T17:40:33-05:00</dc:date>
+<admin:generatorAgent rdf:resource="http://www.exampletoolkit.org/"/>
+<admin:errorReportsTo rdf:resource="mailto:mark@example.org"/>
+<items>
+<rdf:Seq>
+<rdf:li rdf:resource="http://www.example.org/1" />
+</rdf:Seq>
+</items>
+</channel>
+<item rdf:about="http://www.example.org/1">
+<title>First of all</title>
+<link>http://example.org/archives/2002/09/04.html#first_of_all</link>
+<description>
+Americans are fat. Smokers are stupid. People who don’t speak Perl are irrelevant.
+</description>
+<dc:subject>Quotes</dc:subject>
+<dc:date>2004-05-30T14:23:54-06:00</dc:date>
+<content:encoded><![CDATA[<cite>Ian Hickson</cite>: <q><a href="http://ln.hixie.ch/?start=1030823786&count=1">
+Americans are fat. Smokers are stupid. People who don’t speak Perl are irrelevant.
+</a></q>]]>
+</content:encoded>
+</item>
+</rdf:RDF>
(DIR) diff --git a/input/sfeed/realworld/feedparser_rss20_annotated.xml b/input/sfeed/realworld/feedparser_rss20_annotated.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0">
+<channel>
+<title>Sample Feed</title>
+<description>For documentation <em>only</em></description>
+<link>http://example.org/</link>
+<language>en</language>
+<copyright>Copyright 2004, Mark Pilgrim</copyright>
+<managingEditor>editor@example.org</managingEditor>
+<webMaster>webmaster@example.org</webMaster>
+<pubDate>Sat, 07 Sep 2002 0:00:01 GMT</pubDate>
+<category>Examples</category>
+<generator>Sample Toolkit</generator>
+<docs>http://feedvalidator.org/docs/rss2.html</docs>
+<cloud domain="rpc.example.com"
+port="80"
+path="/RPC2"
+registerProcedure="pingMe"
+protocol="soap"/>
+<ttl>60</ttl>
+<image>
+<url>http://example.org/banner.png</url>
+<title>Example banner</title>
+<link>http://example.org/</link>
+<width>80</width>
+<height>15</height>
+</image>
+<textInput>
+<title>Search</title>
+<description>Search this site:</description>
+<name>q</name>
+<link>http://example.org/mt/mt-search.cgi</link>
+</textInput>
+<item>
+<title>First item title</title>
+<link>http://example.org/item/1</link>
+<description>Watch out for
+<span style="background: url(javascript:window.location=’http://example.org/’)">
+nasty tricks</span>
+</description>
+<author>mark@example.org</author>
+<category>Miscellaneous</category>
+<comments>http://example.org/comments/1</comments>
+<enclosure url="http://example.org/audio/demo.mp3" length="1069871" type="audio/mpeg"/>
+<guid>http://example.org/guid/1</guid>
+<pubDate>Thu, 05 Sep 2002 0:00:01 GMT</pubDate>
+</item>
+</channel>
+</rss>
(DIR) diff --git a/input/sfeed/realworld/feedparser_rss20_ns_annotated.xml b/input/sfeed/realworld/feedparser_rss20_ns_annotated.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0"
+xmlns:dc="http://purl.org/dc/elements/1.1/"
+xmlns:admin="http://webns.net/mvcb/"
+xmlns:content="http://purl.org/rss/1.0/modules/content/"
+xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<channel>
+<title>Sample Feed</title>
+<link>http://example.org/</link>
+<description>For documentation only</description>
+<dc:language>en-us</dc:language>
+<dc:creator>Mark Pilgrim (mark@example.org)</dc:creator>
+<dc:rights>Copyright 2004 Mark Pilgrim</dc:rights>
+<dc:date>2004-06-04T17:40:33-05:00</dc:date>
+<admin:generatorAgent rdf:resource="http://www.exampletoolkit.org/"/>
+<admin:errorReportsTo rdf:resource="mailto:mark@example.org"/>
+<item>
+<title>First of all</title>
+<link>http://example.org/archives/2002/09/04.html#first_of_all</link>
+<guid isPermaLink="false">1983@example.org</guid>
+<description>
+Americans are fat. Smokers are stupid. People who don’t speak Perl are irrelevant.
+</description>
+<dc:subject>Quotes</dc:subject>
+<dc:date>2002-09-04T13:54:20-05:00</dc:date>
+<content:encoded><![CDATA[<cite>Ian Hickson</cite>: <q><a href="http://ln.hixie.ch/?start=1030823786&count=1?>
+Americans are fat. Smokers are stupid. People who don’t speak Perl are irrelevant.
+</a></q>
+]]>
+</content:encoded>
+</item>
+</channel>
+</rss>