Browse Source

Add more third-party tests

master
J. King 11 months ago
parent
commit
626ae0a21f
  1. 2
      tests/cases/mensbeam/default-settings/entry-date.html
  2. 0
      tests/cases/mensbeam/default-settings/implied.html
  3. 47
      tests/cases/third-party/js/textcontent.html
  4. 50
      tests/cases/third-party/js/textcontent.json
  5. 10
      tests/cases/third-party/phpmf2/classic/hentry-tag3.html
  6. 60
      tests/cases/third-party/phpmf2/classic/hentry-tag3.json
  7. 4
      tests/cases/third-party/phpmf2/classic/multiroot.html
  8. 18
      tests/cases/third-party/phpmf2/classic/multiroot.json
  9. 4
      tests/cases/third-party/phpmf2/classic/vcard-geo.html
  10. 25
      tests/cases/third-party/phpmf2/classic/vcard-geo.json

2
tests/cases/mensbeam/default-settings/entry-date.html

@ -1,6 +1,6 @@
<!--
This tests the negative cases of "entry-date", when it is on the wrong
element date or the element does not have the correct attribute.
element type or the element does not have the correct attribute.
-->
<div class="hentry">
<span class="entry-date">2023-06-21</span>

0
tests/cases/mensbeam/default-settings/implied.html

47
tests/cases/third-party/js/textcontent.html

@ -0,0 +1,47 @@
<!--
A (mostly) thorough test of "new" textContent parsing, taken from the
JavaScript test suite here:
https://github.com/microformats/microformats-parser/blob/master/test/suites/experimental/text-content.html
-->
<div class="h-entry">
<span class="p-location h-adr">
<span class="p-locality">Berlin</span>,
<span class="p-region">Berlin</span>,
<span class="p-country-name">DE</span>
<data class="p-latitude" value="52.518606"></data>
<data class="p-longitude" value="13.376127"></data>
</span>
</div>
<div class="h-card">
<p class="p-name">
<script>
alert("hi!");
</script>
<style>
body {
background: green;
}
</style>
Bob Smith
</p>
<div class="p-title">
Senior
<p>
General
<br />
Waste
</p>
</div>
</div>
<div class="h-card">
<p class="p-name">
<img src="/profile-picture.jpg" alt="Bob Smith" />
</p>
</div>
<a rel="me" href="/">
<img />
Joe Bloggs
</a>

50
tests/cases/third-party/js/textcontent.json

@ -0,0 +1,50 @@
{
"items": [
{
"type": ["h-entry"],
"properties": {
"location": [
{
"type": ["h-adr"],
"properties": {
"locality": ["Berlin"],
"region": ["Berlin"],
"country-name": ["DE"],
"latitude": ["52.518606"],
"longitude": ["13.376127"]
},
"value": "Berlin, Berlin, DE"
}
]
}
},
{
"type": ["h-card"],
"properties": {
"name": ["Bob Smith"],
"title": ["Senior\nGeneral\nWaste"]
}
},
{
"type": ["h-card"],
"properties": {
"name": ["Bob Smith"],
"photo": [
{
"alt": "Bob Smith",
"value": "http://example.com/profile-picture.jpg"
}
]
}
}
],
"rels": {
"me": ["http://example.com/"]
},
"rel-urls": {
"http://example.com/": {
"rels": ["me"],
"text": "Joe Bloggs"
}
}
}

10
tests/cases/third-party/phpmf2/classic/hentry-tag3.html

@ -0,0 +1,10 @@
<div class="hentry">
<a rel="tag" href="/tags/testing/">Testing</a>,
<a rel="tag" href="/tags/microformats">Microformats</a>
</div>
<div class="hreview">
<a rel="tag" href="/tags/phpmf2/">php-mf2</a>,
<a rel="tag" href="/tags/mf2py">mf2py</a>
</div>

60
tests/cases/third-party/phpmf2/classic/hentry-tag3.json

@ -0,0 +1,60 @@
{
"items": [
{
"type": [
"h-entry"
],
"properties": {
"category": [
"testing",
"microformats"
]
}
},
{
"type": [
"h-review"
],
"properties": {
"category": [
"phpmf2",
"mf2py"
]
}
}
],
"rels": {
"tag": [
"http://example.com/tags/testing/",
"http://example.com/tags/microformats",
"http://example.com/tags/phpmf2/",
"http://example.com/tags/mf2py"
]
},
"rel-urls": {
"http://example.com/tags/testing/": {
"text": "Testing",
"rels": [
"tag"
]
},
"http://example.com/tags/microformats": {
"text": "Microformats",
"rels": [
"tag"
]
},
"http://example.com/tags/phpmf2/": {
"text": "php-mf2",
"rels": [
"tag"
]
},
"http://example.com/tags/mf2py": {
"text": "mf2py",
"rels": [
"tag"
]
}
}
}

4
tests/cases/third-party/phpmf2/classic/multiroot.html

@ -0,0 +1,4 @@
<article class="vevent hentry">
<span class="entry-title">h-entry name</span>
<span class="summary">h-event name</span>
</article>

18
tests/cases/third-party/phpmf2/classic/multiroot.json

@ -0,0 +1,18 @@
{
"items": [
{
"type": [
"h-entry",
"h-event"
],
"properties": {
"name": [
"h-entry name",
"h-event name"
]
}
}
],
"rels": {},
"rel-urls": {}
}

4
tests/cases/third-party/phpmf2/classic/vcard-geo.html

@ -0,0 +1,4 @@
<div class="vcard">
<div class="fn">John Doe</div>
<div>Location: <abbr class="geo" title="30.267991;-97.739568">Brighton</abbr></div>
</div>

25
tests/cases/third-party/phpmf2/classic/vcard-geo.json

@ -0,0 +1,25 @@
{
"items": [
{
"type": [
"h-card"
],
"properties": {
"name": [
"John Doe"
],
"geo": [
{
"type": [
"h-geo"
],
"properties": {},
"value": "30.267991;-97.739568"
}
]
}
}
],
"rels": {},
"rel-urls": {}
}
Loading…
Cancel
Save