Browse Source

Tests formatting cleanup

pull/82/head
Vitaly Puzrin 10 years ago
parent
commit
196be0c20d
  1. 4
      test/fixtures/markdown-it/commonmark_extras.txt
  2. 1
      test/fixtures/markdown-it/proto.txt
  3. 22
      test/fixtures/markdown-it/smartquotes.txt
  4. 17
      test/fixtures/markdown-it/strikethrough.txt
  5. 13
      test/fixtures/markdown-it/tables.txt
  6. 11
      test/fixtures/markdown-it/typographer.txt
  7. 8
      test/fixtures/markdown-it/xss.txt

4
test/fixtures/markdown-it/commonmark_extras.txt

@ -84,9 +84,7 @@ Autolinks do not allow escaping:
. .
Escaping entities in links: Escaping entities in links:
. .
[](<&quot;> "&amp;&ouml;") [](<&quot;> "&amp;&ouml;")
@ -101,7 +99,6 @@ Escaping entities in links:
Checking combination of replaceEntities and unescapeMd: Checking combination of replaceEntities and unescapeMd:
. .
~~~ &amp;\&amp;\\&amp; ~~~ &amp;\&amp;\\&amp;
just a funny little fence just a funny little fence
@ -220,6 +217,7 @@ Coverage. Link
<p>[test](</p> <p>[test](</p>
. .
Coverage. Reference Coverage. Reference
. .
[ [

1
test/fixtures/markdown-it/proto.txt

@ -1,4 +1,3 @@
. .
[__proto__] [__proto__]

22
test/fixtures/markdown-it/smartquotes.txt

@ -1,20 +1,15 @@
Should parse nested quotes: Should parse nested quotes:
. .
"foo 'bar' baz" "foo 'bar' baz"
.
<p>“foo ‘bar’ baz”</p>
.
.
'foo 'bar' baz' 'foo 'bar' baz'
. .
<p>“foo ‘bar’ baz”</p>
<p>‘foo ‘bar’ baz’</p> <p>‘foo ‘bar’ baz’</p>
. .
Should not overlap quotes: Should not overlap quotes:
. .
'foo "bar' baz" 'foo "bar' baz"
. .
@ -23,7 +18,6 @@ Should not overlap quotes:
Should match quotes on the same level: Should match quotes on the same level:
. .
"foo *bar* baz" "foo *bar* baz"
. .
@ -32,7 +26,6 @@ Should match quotes on the same level:
Should handle adjacent nested quotes: Should handle adjacent nested quotes:
. .
'"double in single"' '"double in single"'
@ -45,25 +38,21 @@ Should handle adjacent nested quotes:
Should not match quotes on different levels: Should not match quotes on different levels:
. .
*"foo* bar" *"foo* bar"
"foo *bar"* "foo *bar"*
.
<p><em>&quot;foo</em> bar&quot;</p>
<p>&quot;foo <em>bar&quot;</em></p>
.
.
*"foo* bar *baz"* *"foo* bar *baz"*
. .
<p><em>&quot;foo</em> bar&quot;</p>
<p>&quot;foo <em>bar&quot;</em></p>
<p><em>&quot;foo</em> bar <em>baz&quot;</em></p> <p><em>&quot;foo</em> bar <em>baz&quot;</em></p>
. .
Should try and find matching quote in this case:
Should try and find matching quote in this case:
. .
"foo "bar 'baz" "foo "bar 'baz"
. .
@ -72,7 +61,6 @@ Should try and find matching quote in this case:
Should not touch 'inches' in quotes: Should not touch 'inches' in quotes:
. .
"Monitor 21"" and "Monitor"" "Monitor 21"" and "Monitor""
. .
@ -81,7 +69,6 @@ Should not touch 'inches' in quotes:
Should render an apostrophe as a rsquo: Should render an apostrophe as a rsquo:
. .
This isn't and can't be the best approach to implement this... This isn't and can't be the best approach to implement this...
. .
@ -90,7 +77,6 @@ This isn't and can't be the best approach to implement this...
Apostrophe could end the word, that's why original smartypants replaces all of them as rsquo: Apostrophe could end the word, that's why original smartypants replaces all of them as rsquo:
. .
users' stuff users' stuff
. .

17
test/fixtures/markdown-it/strikethrough.txt

@ -22,15 +22,8 @@ x ~~~~foo~~~~
<p>x <s><s>foo</s></s></p> <p>x <s><s>foo</s></s></p>
. .
# Disabled since we moved subsripts to plugins
#.
#x ~~~foo~~~
#.
#<p>x <s><sub>foo</sub></s></p>
#.
Strikeouts have the same priority as emphases: Strikeouts have the same priority as emphases:
. .
**~~test**~~ **~~test**~~
@ -40,6 +33,7 @@ Strikeouts have the same priority as emphases:
<p><s>**test</s>**</p> <p><s>**test</s>**</p>
. .
Strikeouts have the same priority as emphases with respect to links: Strikeouts have the same priority as emphases with respect to links:
. .
[~~link]()~~ [~~link]()~~
@ -50,6 +44,7 @@ Strikeouts have the same priority as emphases with respect to links:
<p>~~<a href="">link~~</a></p> <p>~~<a href="">link~~</a></p>
. .
Strikeouts have the same priority as emphases with respect to backticks: Strikeouts have the same priority as emphases with respect to backticks:
. .
~~`code~~` ~~`code~~`
@ -60,19 +55,18 @@ Strikeouts have the same priority as emphases with respect to backticks:
<p><code>~~code</code>~~</p> <p><code>~~code</code>~~</p>
. .
Nested strikeouts: Nested strikeouts:
. .
~~foo ~~bar~~ baz~~ ~~foo ~~bar~~ baz~~
.
<p><s>foo <s>bar</s> baz</s></p>
.
.
~~f **o ~~o b~~ a** r~~ ~~f **o ~~o b~~ a** r~~
. .
<p><s>foo <s>bar</s> baz</s></p>
<p><s>f <strong>o <s>o b</s> a</strong> r</s></p> <p><s>f <strong>o <s>o b</s> a</strong> r</s></p>
. .
Should not have a whitespace between text and "~~": Should not have a whitespace between text and "~~":
. .
foo ~~ bar ~~ baz foo ~~ bar ~~ baz
@ -82,7 +76,6 @@ foo ~~ bar ~~ baz
Newline should be considered a whitespace: Newline should be considered a whitespace:
. .
~~test ~~test
~~ ~~

13
test/fixtures/markdown-it/tables.txt

@ -16,6 +16,7 @@ Simple:
</table> </table>
. .
Column alignment: Column alignment:
. .
| Header 1 | Header 2 | Header 3 | Header 4 | | Header 1 | Header 2 | Header 3 | Header 4 |
@ -34,6 +35,7 @@ Column alignment:
</table> </table>
. .
Nested emphases: Nested emphases:
. .
Header 1|Header 2|Header 3|Header 4 Header 1|Header 2|Header 3|Header 4
@ -52,6 +54,7 @@ Cell 1 |Cell 2 |Cell 3 |Cell 4
</table> </table>
. .
Nested tables inside blockquotes: Nested tables inside blockquotes:
. .
> foo|foo > foo|foo
@ -72,6 +75,7 @@ baz|baz
<p>baz|baz</p> <p>baz|baz</p>
. .
Nested tables inside lists: Nested tables inside lists:
. .
- foo|foo - foo|foo
@ -110,6 +114,7 @@ Minimal one-column:
</table> </table>
. .
Second line indent should not be smaller than first: Second line indent should not be smaller than first:
. .
- foo|foo - foo|foo
@ -123,6 +128,7 @@ bar|bar</li>
</ul> </ul>
. .
Second line should not contain symbols except "-", ":", "|" and " ": Second line should not contain symbols except "-", ":", "|" and " ":
. .
foo|foo foo|foo
@ -134,6 +140,7 @@ bar|bar
bar|bar</p> bar|bar</p>
. .
Second line should contain "|" symbol: Second line should contain "|" symbol:
. .
foo|foo foo|foo
@ -145,6 +152,7 @@ bar|bar
bar|bar</p> bar|bar</p>
. .
Second line should not have empty columns in the middle: Second line should not have empty columns in the middle:
. .
foo|foo foo|foo
@ -156,6 +164,7 @@ bar|bar
bar|bar</p> bar|bar</p>
. .
Wrong alignment symbol position: Wrong alignment symbol position:
. .
foo|foo foo|foo
@ -179,6 +188,7 @@ bar|bar
bar|bar</p> bar|bar</p>
. .
Title line should have correct column count: Title line should have correct column count:
. .
foo|foo foo|foo
@ -190,6 +200,7 @@ bar|bar
bar|bar</p> bar|bar</p>
. .
Should terminate paragraph: Should terminate paragraph:
. .
paragraph paragraph
@ -208,6 +219,7 @@ bar|bar
</table> </table>
. .
Should be terminated via row without "|" symbol: Should be terminated via row without "|" symbol:
. .
foo|foo foo|foo
@ -224,6 +236,7 @@ paragraph
<p>paragraph</p> <p>paragraph</p>
. .
Delimiter escaping: Delimiter escaping:
. .
| Heading 1 \\\\| Heading 2 | Heading 1 \\\\| Heading 2

11
test/fixtures/markdown-it/typographer.txt

@ -68,17 +68,14 @@ dashes
markdownit---awesome markdownit---awesome
abc ---- abc ----
.
<p>—markdownit — super—</p>
<p>markdownit—awesome</p>
<p>abc ----</p>
.
.
--markdownit -- super-- --markdownit -- super--
markdownit--awesome markdownit--awesome
. .
<p>—markdownit — super—</p>
<p>markdownit—awesome</p>
<p>abc ----</p>
<p>–markdownit – super–</p> <p>–markdownit – super–</p>
<p>markdownit–awesome</p> <p>markdownit–awesome</p>
. .

8
test/fixtures/markdown-it/xss.txt

@ -5,9 +5,7 @@
. .
Should not allow some protocols in links and images Should not allow some protocols in links and images
. .
[xss link](javascript:alert(1)) [xss link](javascript:alert(1))
@ -33,7 +31,6 @@ Should not allow some protocols in links and images
[xss link](&#74;avascript:alert(1)) [xss link](&#74;avascript:alert(1))
[xss link](&#x26;#74;avascript:alert(1)) [xss link](&#x26;#74;avascript:alert(1))
. .
<p><a href="%22%3E%3Cscript%3Ealert(%22xss%22)%3C/script%3E">xss link</a></p> <p><a href="%22%3E%3Cscript%3Ealert(%22xss%22)%3C/script%3E">xss link</a></p>
<p>[xss link](Javascript:alert(1))</p> <p>[xss link](Javascript:alert(1))</p>
@ -54,7 +51,6 @@ Should not allow some protocols in links and images
Image parser use the same code base. Image parser use the same code base.
. .
![xss link](javascript:alert(1)) ![xss link](javascript:alert(1))
. .
@ -63,7 +59,6 @@ Image parser use the same code base.
Autolinks Autolinks
. .
<javascript&#x3A;alert(1)> <javascript&#x3A;alert(1)>
@ -75,7 +70,6 @@ Autolinks
Linkifier Linkifier
. .
javascript&#x3A;alert(1) javascript&#x3A;alert(1)
@ -85,8 +79,8 @@ javascript:alert(1)
<p>javascript:alert(1)</p> <p>javascript:alert(1)</p>
. .
References
References
. .
[test]: javascript:alert(1) [test]: javascript:alert(1)
. .

Loading…
Cancel
Save