Skip to content

Commit

Permalink
Add more unit tests for escaped/naked markup
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew McDole committed Apr 17, 2016
1 parent c261d90 commit f15bf6d
Show file tree
Hide file tree
Showing 86 changed files with 524 additions and 2 deletions.
4 changes: 4 additions & 0 deletions testdata/parser/atom/version_atom03.json
@@ -0,0 +1,4 @@
{
"entries": [],
"version": "0.3"
}
5 changes: 5 additions & 0 deletions testdata/parser/atom/version_atom03.xml
@@ -0,0 +1,5 @@
<!--
Description: feed title
-->
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
</feed>
File renamed without changes.
@@ -1,6 +1,5 @@
<!--
Description: Atom 1.0 version from namespace
Expect: not bozo and version == 'atom10'
-->
<feed xmlns="http://www.w3.org/2005/Atom">
</feed>
</feed>
@@ -0,0 +1,5 @@
{
"description": "<p>Example description</p>",
"items": [],
"version": "1.0"
}
@@ -0,0 +1,8 @@
<!--
Description: rdf channel description - escaped markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<description>&lt;p&gt;Example description&lt;/p&gt;</description>
</channel>
</rdf:RDF>
5 changes: 5 additions & 0 deletions testdata/parser/rss/rdf_channel_description_naked_markup.json
@@ -0,0 +1,5 @@
{
"description": "<p>Example description</p>",
"items": [],
"version": "1.0"
}
8 changes: 8 additions & 0 deletions testdata/parser/rss/rdf_channel_description_naked_markup.xml
@@ -0,0 +1,8 @@
<!--
Description: rdf channel description - naked markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<description><p>Example description</p></description>
</channel>
</rdf:RDF>
5 changes: 5 additions & 0 deletions testdata/parser/rss/rdf_channel_title_escaped_markup.json
@@ -0,0 +1,5 @@
{
"title": "<p>Example feed</p>",
"items": [],
"version": "1.0"
}
8 changes: 8 additions & 0 deletions testdata/parser/rss/rdf_channel_title_escaped_markup.xml
@@ -0,0 +1,8 @@
<!--
Description: rdf channel title - escaped markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<title>&lt;p&gt;Example feed&lt;/p&gt;</title>
</channel>
</rdf:RDF>
5 changes: 5 additions & 0 deletions testdata/parser/rss/rdf_channel_title_naked_markup.json
@@ -0,0 +1,5 @@
{
"title": "<p>Example feed</p>",
"items": [],
"version": "1.0"
}
8 changes: 8 additions & 0 deletions testdata/parser/rss/rdf_channel_title_naked_markup.xml
@@ -0,0 +1,8 @@
<!--
Description: rdf channel title - naked markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<title><p>Example feed</p></title>
</channel>
</rdf:RDF>
8 changes: 8 additions & 0 deletions testdata/parser/rss/rdf_item_description_escaped_markup.json
@@ -0,0 +1,8 @@
{
"items": [
{
"description": "<p>Example description</p>"
}
],
"version": "1.0"
}
15 changes: 15 additions & 0 deletions testdata/parser/rss/rdf_item_description_escaped_markup.xml
@@ -0,0 +1,15 @@
<!--
Description: rdf item description - escaped markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<items>
<rdf:Seq>
<rdf:li resource="http://example.com/1"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://example.com/1">
<description>&lt;p&gt;Example description&lt;/p&gt;</description>
</item>
</rdf:RDF>
8 changes: 8 additions & 0 deletions testdata/parser/rss/rdf_item_description_naked_markup.json
@@ -0,0 +1,8 @@
{
"items": [
{
"description": "<p>Example description</p>"
}
],
"version": "1.0"
}
15 changes: 15 additions & 0 deletions testdata/parser/rss/rdf_item_description_naked_markup.xml
@@ -0,0 +1,15 @@
<!--
Description: rdf item description - naked markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<items>
<rdf:Seq>
<rdf:li resource="http://example.com/1"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://example.com/1">
<description><p>Example description</p></description>
</item>
</rdf:RDF>
8 changes: 8 additions & 0 deletions testdata/parser/rss/rdf_item_title_escaped_markup.json
@@ -0,0 +1,8 @@
{
"items": [
{
"title": "<p>Example title</p>"
}
],
"version": "1.0"
}
15 changes: 15 additions & 0 deletions testdata/parser/rss/rdf_item_title_escaped_markup.xml
@@ -0,0 +1,15 @@
<!--
Description: rdf item title - escaped markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<items>
<rdf:Seq>
<rdf:li resource="http://example.com/1"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://example.com/1">
<title>&lt;p&gt;Example title&lt;/p&gt;</title>
</item>
</rdf:RDF>
8 changes: 8 additions & 0 deletions testdata/parser/rss/rdf_item_title_naked_markup.json
@@ -0,0 +1,8 @@
{
"items": [
{
"title": "<p>Example title</p>"
}
],
"version": "1.0"
}
15 changes: 15 additions & 0 deletions testdata/parser/rss/rdf_item_title_naked_markup.xml
@@ -0,0 +1,15 @@
<!--
Description: rdf item title - naked markup
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://example.com/index.rdf">
<items>
<rdf:Seq>
<rdf:li resource="http://example.com/1"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://example.com/1">
<title><p>Example title</p></title>
</item>
</rdf:RDF>
14 changes: 14 additions & 0 deletions testdata/parser/rss/rss_channel_category_escaped_markup.json
@@ -0,0 +1,14 @@
{
"categories": [
{
"domain": "http://www.example.com/1",
"value": "<p>Example category 1</p>"
},
{
"domain": "http://www.example.com/2",
"value": "<p>Example category 2</p>"
}
],
"items": [],
"version": "2.0"
}
9 changes: 9 additions & 0 deletions testdata/parser/rss/rss_channel_category_escaped_markup.xml
@@ -0,0 +1,9 @@
<!--
Description: channel categories - naked markup
-->
<rss version="2.0">
<channel>
<category domain="http://www.example.com/1"><p>Example category 1</p></category>
<category domain="http://www.example.com/2"><p>Example category 2</p></category>
</channel>
</rss>
14 changes: 14 additions & 0 deletions testdata/parser/rss/rss_channel_category_naked_markup.json
@@ -0,0 +1,14 @@
{
"categories": [
{
"domain": "http://www.example.com/1",
"value": "<p>Example category 1</p>"
},
{
"domain": "http://www.example.com/2",
"value": "<p>Example category 2</p>"
}
],
"items": [],
"version": "2.0"
}
9 changes: 9 additions & 0 deletions testdata/parser/rss/rss_channel_category_naked_markup.xml
@@ -0,0 +1,9 @@
<!--
Description: channel categories - escaped markup
-->
<rss version="2.0">
<channel>
<category domain="http://www.example.com/1">&lt;p&gt;Example category 1&lt;/p&gt;</category>
<category domain="http://www.example.com/2">&lt;p&gt;Example category 2&lt;/p&gt;</category>
</channel>
</rss>
5 changes: 5 additions & 0 deletions testdata/parser/rss/rss_channel_copyright_escaped_markup.json
@@ -0,0 +1,5 @@
{
"copyright": "<p>Example copyright</p>",
"items": [],
"version": "2.0"
}
8 changes: 8 additions & 0 deletions testdata/parser/rss/rss_channel_copyright_escaped_markup.xml
@@ -0,0 +1,8 @@
<!--
Description: channel copyright - Escaped Markup
-->
<rss version="2.0">
<channel>
<copyright>&lt;p&gt;Example copyright&lt;/p&gt;</copyright>
</channel>
</rss>
5 changes: 5 additions & 0 deletions testdata/parser/rss/rss_channel_copyright_naked_markup.json
@@ -0,0 +1,5 @@
{
"copyright": "<p>Example copyright</p>",
"items": [],
"version": "2.0"
}
8 changes: 8 additions & 0 deletions testdata/parser/rss/rss_channel_copyright_naked_markup.xml
@@ -0,0 +1,8 @@
<!--
Description: channel copyright - Escaped Markup
-->
<rss version="2.0">
<channel>
<copyright>&lt;p&gt;Example copyright&lt;/p&gt;</copyright>
</channel>
</rss>
5 changes: 5 additions & 0 deletions testdata/parser/rss/rss_channel_generator_escaped_markup.json
@@ -0,0 +1,5 @@
{
"generator": "<p>Example generator</p>",
"items": [],
"version": "2.0"
}
8 changes: 8 additions & 0 deletions testdata/parser/rss/rss_channel_generator_escaped_markup.xml
@@ -0,0 +1,8 @@
<!--
Description: channel generator - escaped markup
-->
<rss version="2.0">
<channel>
<generator>&lt;p&gt;Example generator&lt;/p&gt;</generator>
</channel>
</rss>
5 changes: 5 additions & 0 deletions testdata/parser/rss/rss_channel_generator_naked_markup.json
@@ -0,0 +1,5 @@
{
"generator": "<p>Example generator</p>",
"items": [],
"version": "2.0"
}
8 changes: 8 additions & 0 deletions testdata/parser/rss/rss_channel_generator_naked_markup.xml
@@ -0,0 +1,8 @@
<!--
Description: channel generator - naked markup
-->
<rss version="2.0">
<channel>
<generator><p>Example generator</p></generator>
</channel>
</rss>
@@ -0,0 +1,8 @@
{
"items": [
{
"author": "<p>Example editor</p>"
}
],
"version": "2.0"
}
10 changes: 10 additions & 0 deletions testdata/parser/rss/rss_channel_item_author_escaped_markup.xml
@@ -0,0 +1,10 @@
<!--
Description: item author - escaped markup
-->
<rss version="2.0">
<channel>
<item>
<author>&lt;p&gt;Example editor&lt;/p&gt;</author>
</item>
</channel>
</rss>
8 changes: 8 additions & 0 deletions testdata/parser/rss/rss_channel_item_author_naked_markup.json
@@ -0,0 +1,8 @@
{
"items": [
{
"author": "<p>Example editor</p>"
}
],
"version": "2.0"
}
10 changes: 10 additions & 0 deletions testdata/parser/rss/rss_channel_item_author_naked_markup.xml
@@ -0,0 +1,10 @@
<!--
Description: item author - naked markup
-->
<rss version="2.0">
<channel>
<item>
<author><p>Example editor</p></author>
</item>
</channel>
</rss>
17 changes: 17 additions & 0 deletions testdata/parser/rss/rss_channel_item_category_escaped_markup.json
@@ -0,0 +1,17 @@
{
"items": [
{
"categories": [
{
"domain": "http://www.example.com/1",
"value": "<p>Example category 1</p>"
},
{
"domain": "http://www.example.com/2",
"value": "<p>Example category 2</p>"
}
]
}
],
"version": "2.0"
}
11 changes: 11 additions & 0 deletions testdata/parser/rss/rss_channel_item_category_escaped_markup.xml
@@ -0,0 +1,11 @@
<!--
Description: item categories - escaped markup
-->
<rss version="2.0">
<channel>
<item>
<category domain="http://www.example.com/1">&lt;p&gt;Example category 1&lt;/p&gt;</category>
<category domain="http://www.example.com/2">&lt;p&gt;Example category 2&lt;/p&gt;</category>
</item>
</channel>
</rss>
17 changes: 17 additions & 0 deletions testdata/parser/rss/rss_channel_item_category_naked_markup.json
@@ -0,0 +1,17 @@
{
"items": [
{
"categories": [
{
"domain": "http://www.example.com/1",
"value": "<p>Example category 1</p>"
},
{
"domain": "http://www.example.com/2",
"value": "<p>Example category 2</p>"
}
]
}
],
"version": "2.0"
}
11 changes: 11 additions & 0 deletions testdata/parser/rss/rss_channel_item_category_naked_markup.xml
@@ -0,0 +1,11 @@
<!--
Description: item categories - naked markup
-->
<rss version="2.0">
<channel>
<item>
<category domain="http://www.example.com/1"><p>Example category 1</p></category>
<category domain="http://www.example.com/2"><p>Example category 2</p></category>
</item>
</channel>
</rss>

0 comments on commit f15bf6d

Please sign in to comment.