forked from mmcdole/gofeed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more unit tests for escaped/naked markup (mmcdole#35)
- Loading branch information
Showing
86 changed files
with
524 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"entries": [], | ||
"version": "0.3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
Description: feed title | ||
--> | ||
<feed version="0.3" xmlns="http://purl.org/atom/ns#"> | ||
</feed> |
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
testdata/parser/atom/atom10_version.xml → testdata/parser/atom/version_atom10.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
5 changes: 5 additions & 0 deletions
5
testdata/parser/rss/rdf_channel_description_escaped_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"description": "<p>Example description</p>", | ||
"items": [], | ||
"version": "1.0" | ||
} |
8 changes: 8 additions & 0 deletions
8
testdata/parser/rss/rdf_channel_description_escaped_markup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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><p>Example description</p></description> | ||
</channel> | ||
</rdf:RDF> |
5 changes: 5 additions & 0 deletions
5
testdata/parser/rss/rdf_channel_description_naked_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"description": "<p>Example description</p>", | ||
"items": [], | ||
"version": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"title": "<p>Example feed</p>", | ||
"items": [], | ||
"version": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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><p>Example feed</p></title> | ||
</channel> | ||
</rdf:RDF> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"title": "<p>Example feed</p>", | ||
"items": [], | ||
"version": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"description": "<p>Example description</p>" | ||
} | ||
], | ||
"version": "1.0" | ||
} |
15 changes: 15 additions & 0 deletions
15
testdata/parser/rss/rdf_item_description_escaped_markup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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><p>Example description</p></description> | ||
</item> | ||
</rdf:RDF> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"description": "<p>Example description</p>" | ||
} | ||
], | ||
"version": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"title": "<p>Example title</p>" | ||
} | ||
], | ||
"version": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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><p>Example title</p></title> | ||
</item> | ||
</rdf:RDF> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"title": "<p>Example title</p>" | ||
} | ||
], | ||
"version": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
14
testdata/parser/rss/rss_channel_category_escaped_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
14
testdata/parser/rss/rss_channel_category_naked_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- | ||
Description: channel categories - escaped 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> |
5 changes: 5 additions & 0 deletions
5
testdata/parser/rss/rss_channel_copyright_escaped_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"copyright": "<p>Example copyright</p>", | ||
"items": [], | ||
"version": "2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- | ||
Description: channel copyright - Escaped Markup | ||
--> | ||
<rss version="2.0"> | ||
<channel> | ||
<copyright><p>Example copyright</p></copyright> | ||
</channel> | ||
</rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"copyright": "<p>Example copyright</p>", | ||
"items": [], | ||
"version": "2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- | ||
Description: channel copyright - Escaped Markup | ||
--> | ||
<rss version="2.0"> | ||
<channel> | ||
<copyright><p>Example copyright</p></copyright> | ||
</channel> | ||
</rss> |
5 changes: 5 additions & 0 deletions
5
testdata/parser/rss/rss_channel_generator_escaped_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"generator": "<p>Example generator</p>", | ||
"items": [], | ||
"version": "2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- | ||
Description: channel generator - escaped markup | ||
--> | ||
<rss version="2.0"> | ||
<channel> | ||
<generator><p>Example generator</p></generator> | ||
</channel> | ||
</rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"generator": "<p>Example generator</p>", | ||
"items": [], | ||
"version": "2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- | ||
Description: channel generator - naked markup | ||
--> | ||
<rss version="2.0"> | ||
<channel> | ||
<generator><p>Example generator</p></generator> | ||
</channel> | ||
</rss> |
8 changes: 8 additions & 0 deletions
8
testdata/parser/rss/rss_channel_item_author_escaped_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"author": "<p>Example editor</p>" | ||
} | ||
], | ||
"version": "2.0" | ||
} |
10 changes: 10 additions & 0 deletions
10
testdata/parser/rss/rss_channel_item_author_escaped_markup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- | ||
Description: item author - escaped markup | ||
--> | ||
<rss version="2.0"> | ||
<channel> | ||
<item> | ||
<author><p>Example editor</p></author> | ||
</item> | ||
</channel> | ||
</rss> |
8 changes: 8 additions & 0 deletions
8
testdata/parser/rss/rss_channel_item_author_naked_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"author": "<p>Example editor</p>" | ||
} | ||
], | ||
"version": "2.0" | ||
} |
10 changes: 10 additions & 0 deletions
10
testdata/parser/rss/rss_channel_item_author_naked_markup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
17
testdata/parser/rss/rss_channel_item_category_escaped_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
11
testdata/parser/rss/rss_channel_item_category_escaped_markup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- | ||
Description: item categories - escaped 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> |
17 changes: 17 additions & 0 deletions
17
testdata/parser/rss/rss_channel_item_category_naked_markup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
11
testdata/parser/rss/rss_channel_item_category_naked_markup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Oops, something went wrong.