Browse Source

More tests

master
J. King 4 years ago
parent
commit
c5d2e61cb0
  1. 5
      tests/cases/XML/failures.yaml
  2. 24
      tests/cases/XML/feed-atom.yaml
  3. 22
      tests/cases/XML/feed-rss0.yaml
  4. 50
      tests/cases/XML/feed-rss1.yaml
  5. 37
      tests/cases/XML/feed-rss2.yaml

5
tests/cases/XML/failures.yaml

@ -9,3 +9,8 @@ Root element of non-feed type:
input: >
<html/>
exception: notXMLFeed
Non-feed RDF document:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://channel.netscape.com/rdf/simple/0.9/"/>
exception: notXMLFeed

24
tests/cases/XML/feed-atom.yaml

@ -1,6 +1,28 @@
Minimal Atom feed:
Minimal feed:
input: >
<feed xmlns="http://www.w3.org/2005/Atom"/>
output:
format: atom
version: '1.0'
Atom ID:
input: >
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://example.com/</id>
</feed>
output:
format: atom
version: '1.0'
id: 'http://example.com/'
Atom ID with whitespace:
input: >
<feed xmlns="http://www.w3.org/2005/Atom">
<id>
http://example.com/
</id>
</feed>
output:
format: atom
version: '1.0'
id: 'http://example.com/'

22
tests/cases/XML/feed-rss0.yaml

@ -1,8 +1,26 @@
Minimal RSS 0.90 feed:
input : >
Minimal feed:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://channel.netscape.com/rdf/simple/0.9/">
<channel/>
</rdf:RDF>
output:
format: rdf
version: '0.90'
Minimal feed without channel 1:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://channel.netscape.com/rdf/simple/0.9/">
<item/>
</rdf:RDF>
output:
format: rdf
version: '0.90'
Minimal feed without channel 2:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://channel.netscape.com/rdf/simple/0.9/">
<image/>
</rdf:RDF>
output:
format: rdf
version: '0.90'

50
tests/cases/XML/feed-rss1.yaml

@ -1,8 +1,54 @@
Minimal RSS 1.0 feed:
input : >
# For the purposes of testing Dublin Core metadata is considered a part of RSS 1.0
Minimal feed:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel/>
</rdf:RDF>
output:
format: rdf
version: '1.0'
Minimal feed without channel 1:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<item/>
</rdf:RDF>
output:
format: rdf
version: '1.0'
Minimal feed without channel 2:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<image/>
</rdf:RDF>
output:
format: rdf
version: '1.0'
DC ID:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<dc:identifier>http://example.com/</dc:identifier>
</channel>
</rdf:RDF>
output:
format: rdf
version: '1.0'
id: 'http://example.com/'
DC ID with whitespace:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<dc:identifier>
http://example.com/
</dc:identifier>
</channel>
</rdf:RDF>
output:
format: rdf
version: '1.0'
id: 'http://example.com/'

37
tests/cases/XML/feed-rss2.yaml

@ -1,6 +1,39 @@
Minimal RSS 1.0 feed:
input : >
Minimal feed:
input: >
<rss version="2.0"/>
output:
format: rss
version: '2.0'
Channel GUID:
input: >
<rss>
<channel>
<guid>http://example.com/</guid>
</channel>
</rss>
output:
format: rss
id: 'http://example.com/'
Channel GUID with whitespace:
input: >
<rss>
<channel>
<guid>
http://example.com/
</guid>
</channel>
</rss>
output:
format: rss
id: 'http://example.com/'
Root GUID:
input: >
<rss>
<channel/>
<guid>http://example.com/</guid>
</rss>
output:
format: rss

Loading…
Cancel
Save