Skip to content

Commit

Permalink
Move new/changed test files to CommonMark_0.31.2/
Browse files Browse the repository at this point in the history
This better documents the changes between different CommonMark versions
and shows that all test files from CommonMark 0.30 still pass.
  • Loading branch information
Witiko committed Apr 1, 2024
1 parent 1b265b2 commit b5cc60b
Show file tree
Hide file tree
Showing 32 changed files with 326 additions and 55 deletions.
8 changes: 4 additions & 4 deletions tests/testfiles/CommonMark_0.30/autolinks/002.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
% ---RESULT--- "example": 594,
%
% <p><a href="https://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean">https://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean</a></p>
% <p><a href="http://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean">http://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean</a></p>
%
% ---\RESULT---

<<<
<https://foo.bar.baz/test?q=hello&id=22&boolean>
<http://foo.bar.baz/test?q=hello&id=22&boolean>
>>>
BEGIN document
BEGIN link
- label: https://foo.bar.baz/test?q=hello(ampersand)id=22(ampersand)boolean
- URI: https://foo.bar.baz/test?q=hello&id=22&boolean
- label: http://foo.bar.baz/test?q=hello(ampersand)id=22(ampersand)boolean
- URI: http://foo.bar.baz/test?q=hello&id=22&boolean
- title:
END link
END document
4 changes: 2 additions & 2 deletions tests/testfiles/CommonMark_0.30/autolinks/009.test
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
% ---RESULT--- "example": 601,
%
% <p>&lt;https://foo.bar/baz bim&gt;</p>
% <p>&lt;http://foo.bar/baz bim&gt;</p>
%
% ---\RESULT---

<<<
<https://foo.bar/baz bim>
<http://foo.bar/baz bim>
>>>
BEGIN document
END document
8 changes: 4 additions & 4 deletions tests/testfiles/CommonMark_0.30/autolinks/010.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
% ---RESULT--- "example": 602,
%
% <p><a href="https://example.com/%5C%5B%5C">https://example.com/\[\</a></p>
% <p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p>
%
% ---\RESULT---

<<<
<https://example.com/\[\>
<http://example.com/\[\>
>>>
BEGIN document
BEGIN link
- label: https://example.com/(backslash)[(backslash)
- URI: https://example.com/(backslash)[(backslash)
- label: http://example.com/(backslash)[(backslash)
- URI: http://example.com/(backslash)[(backslash)
- title:
END link
END document
4 changes: 2 additions & 2 deletions tests/testfiles/CommonMark_0.30/autolinks/015.test
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
% ---RESULT--- "example": 607,
%
% <p>&lt; https://foo.bar &gt;</p>
% <p>&lt; http://foo.bar &gt;</p>
%
% ---\RESULT---

<<<
< https://foo.bar >
< http://foo.bar >
>>>
BEGIN document
END document
4 changes: 2 additions & 2 deletions tests/testfiles/CommonMark_0.30/autolinks/018.test
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
% ---RESULT--- "example": 610,
%
% <p>https://example.com</p>
% <p>http://example.com</p>
%
% ---\RESULT---

<<<
https://example.com
http://example.com
>>>
BEGIN document
END document
8 changes: 4 additions & 4 deletions tests/testfiles/CommonMark_0.30/backslash_escapes/009.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
% ---RESULT--- "example": 20,
%
% <p><a href="https://example.com?find=%5C*">https://example.com?find=\*</a></p>
% <p><a href="http://example.com?find=%5C*">http://example.com?find=\*</a></p>
%
% ---\RESULT---

<<<
<https://example.com?find=\*>
<http://example.com?find=\*>
>>>
BEGIN document
BEGIN link
- label: https://example.com?find=(backslash)*
- URI: https://example.com?find=(backslash)*
- label: http://example.com?find=(backslash)*
- URI: http://example.com?find=(backslash)*
- title:
END link
END document
6 changes: 3 additions & 3 deletions tests/testfiles/CommonMark_0.30/code_spans/018.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
% ---RESULT--- "example": 345,
%
% <p><code>&lt;https://foo.bar.</code>baz&gt;`</p>
% <p><code>&lt;http://foo.bar.</code>baz&gt;`</p>
%
% ---\RESULT---

<<<
`<https://foo.bar.`baz>`
`<http://foo.bar.`baz>`
>>>
BEGIN document
codeSpan: <https://foo.bar.
codeSpan: <http://foo.bar.
END document
8 changes: 4 additions & 4 deletions tests/testfiles/CommonMark_0.30/code_spans/019.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
% ---RESULT--- "example": 346,
%
% <p><a href="https://foo.bar.%60baz">https://foo.bar.`baz</a>`</p>
% <p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p>
%
% ---\RESULT---

<<<
<https://foo.bar.`baz>`
<http://foo.bar.`baz>`
>>>
BEGIN document
BEGIN link
- label: https://foo.bar.`baz
- URI: https://foo.bar.`baz
- label: http://foo.bar.`baz
- URI: http://foo.bar.`baz
- title:
END link
END document
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
% ---RESULT--- "example": 479,
%
% <p>**a<a href="https://foo.bar/?q=**">https://foo.bar/?q=**</a></p>
% <p>**a<a href="http://foo.bar/?q=**">http://foo.bar/?q=**</a></p>
%
% ---\RESULT---

<<<
**a<https://foo.bar/?q=**>
**a<http://foo.bar/?q=**>
>>>
BEGIN document
BEGIN link
- label: https://foo.bar/?q=**
- URI: https://foo.bar/?q=**
- label: http://foo.bar/?q=**
- URI: http://foo.bar/?q=**
- title:
END link
END document
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
% ---RESULT--- "example": 480,
%
% <p>__a<a href="https://foo.bar/?q=__">https://foo.bar/?q=__</a></p>
% <p>__a<a href="http://foo.bar/?q=__">http://foo.bar/?q=__</a></p>
%
% ---\RESULT---

<<<
__a<https://foo.bar/?q=__>
__a<http://foo.bar/?q=__>
>>>
BEGIN document
underscore
underscore
BEGIN link
- label: https://foo.bar/?q=(underscore)(underscore)
- URI: https://foo.bar/?q=__
- label: http://foo.bar/?q=(underscore)(underscore)
- URI: http://foo.bar/?q=__
- title:
END link
END document
12 changes: 6 additions & 6 deletions tests/testfiles/CommonMark_0.30/links/020.test
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
% ---RESULT--- "example": 500,
%
% <p><a href="#fragment">link</a></p>
% <p><a href="https://example.com#fragment">link</a></p>
% <p><a href="https://example.com?foo=3#frag">link</a></p>
% <p><a href="http://example.com#fragment">link</a></p>
% <p><a href="http://example.com?foo=3#frag">link</a></p>
%
% ---\RESULT---

<<<
[link](#fragment)

[link](https://example.com#fragment)
[link](http://example.com#fragment)

[link](https://example.com?foo=3#frag)
[link](http://example.com?foo=3#frag)
>>>
BEGIN document
BEGIN link
Expand All @@ -22,13 +22,13 @@ END link
paragraphSeparator
BEGIN link
- label: link
- URI: https://example.com#fragment
- URI: http://example.com#fragment
- title:
END link
paragraphSeparator
BEGIN link
- label: link
- URI: https://example.com?foo=3#frag
- URI: http://example.com?foo=3#frag
- title:
END link
END document
8 changes: 4 additions & 4 deletions tests/testfiles/CommonMark_0.30/links/045.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
% ---RESULT--- "example": 525,
%
% <p>[foo<a href="https://example.com/?search=%5D(uri)">https://example.com/?search=](uri)</a></p>
% <p>[foo<a href="http://example.com/?search=%5D(uri)">http://example.com/?search=](uri)</a></p>
%
% ---\RESULT---

<<<
[foo<https://example.com/?search=](uri)>
[foo<http://example.com/?search=](uri)>
>>>
BEGIN document
BEGIN link
- label: https://example.com/?search=](uri)
- URI: https://example.com/?search=](uri)
- label: http://example.com/?search=](uri)
- URI: http://example.com/?search=](uri)
- title:
END link
END document
8 changes: 4 additions & 4 deletions tests/testfiles/CommonMark_0.30/links/057.test
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
% ---RESULT--- "example": 537,
%
% <p>[foo<a href="https://example.com/?search=%5D%5Bref%5D">https://example.com/?search=][ref]</a></p>
% <p>[foo<a href="http://example.com/?search=%5D%5Bref%5D">http://example.com/?search=][ref]</a></p>
%
% ---\RESULT---

<<<
[foo<https://example.com/?search=][ref]>
[foo<http://example.com/?search=][ref]>

[ref]: /uri
>>>
BEGIN document
BEGIN link
- label: https://example.com/?search=][ref]
- URI: https://example.com/?search=][ref]
- label: http://example.com/?search=][ref]
- URI: http://example.com/?search=][ref]
- title:
END link
END document
14 changes: 14 additions & 0 deletions tests/testfiles/CommonMark_0.30/raw_html/013.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
% ---RESULT--- "example": 624,
%
% <p>foo <!-- this is a
% comment - with hyphen --></p>
%
% ---\RESULT---

<<<
foo <!-- this is a
comment - with hyphen -->
>>>
BEGIN document
inlineHtmlComment: this is a comment - with hyphen
END document
7 changes: 2 additions & 5 deletions tests/testfiles/CommonMark_0.30/raw_html/014.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
% ---RESULT--- "example": 625,
%
% <p>foo <!-- this is a --
% comment - with hyphens --></p>
% <p>foo &lt;!-- not a comment -- two hyphens --&gt;</p>
%
% ---\RESULT---

<<<
foo <!-- this is a --
comment - with hyphens -->
foo <!-- not a comment -- two hyphens -->
>>>
BEGIN document
inlineHtmlComment: this is a -- comment - with hyphens
END document
6 changes: 3 additions & 3 deletions tests/testfiles/CommonMark_0.30/raw_html/015.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
% ---RESULT--- "example": 626,
%
% <p>foo <!--> foo --&gt;</p>
% <p>foo <!---> foo --&gt;</p>
% <p>foo &lt;!--&gt; foo --&gt;</p>
% <p>foo &lt;!-- foo---&gt;</p>
%
% ---\RESULT---

<<<
foo <!--> foo -->

foo <!---> foo -->
foo <!-- foo--->
>>>
BEGIN document
paragraphSeparator
Expand Down
16 changes: 16 additions & 0 deletions tests/testfiles/CommonMark_0.31.2/autolinks/002.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
% ---RESULT--- "example": 594,
%
% <p><a href="https://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean">https://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean</a></p>
%
% ---\RESULT---

<<<
<https://foo.bar.baz/test?q=hello&id=22&boolean>
>>>
BEGIN document
BEGIN link
- label: https://foo.bar.baz/test?q=hello(ampersand)id=22(ampersand)boolean
- URI: https://foo.bar.baz/test?q=hello&id=22&boolean
- title:
END link
END document
11 changes: 11 additions & 0 deletions tests/testfiles/CommonMark_0.31.2/autolinks/009.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
% ---RESULT--- "example": 601,
%
% <p>&lt;https://foo.bar/baz bim&gt;</p>
%
% ---\RESULT---

<<<
<https://foo.bar/baz bim>
>>>
BEGIN document
END document
16 changes: 16 additions & 0 deletions tests/testfiles/CommonMark_0.31.2/autolinks/010.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
% ---RESULT--- "example": 602,
%
% <p><a href="https://example.com/%5C%5B%5C">https://example.com/\[\</a></p>
%
% ---\RESULT---

<<<
<https://example.com/\[\>
>>>
BEGIN document
BEGIN link
- label: https://example.com/(backslash)[(backslash)
- URI: https://example.com/(backslash)[(backslash)
- title:
END link
END document
11 changes: 11 additions & 0 deletions tests/testfiles/CommonMark_0.31.2/autolinks/015.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
% ---RESULT--- "example": 607,
%
% <p>&lt; https://foo.bar &gt;</p>
%
% ---\RESULT---

<<<
< https://foo.bar >
>>>
BEGIN document
END document
11 changes: 11 additions & 0 deletions tests/testfiles/CommonMark_0.31.2/autolinks/018.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
% ---RESULT--- "example": 610,
%
% <p>https://example.com</p>
%
% ---\RESULT---

<<<
https://example.com
>>>
BEGIN document
END document
Loading

0 comments on commit b5cc60b

Please sign in to comment.