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

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

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

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

@ -1,20 +1,15 @@
Should parse nested quotes:
.
"foo 'bar' baz"
.
<p>“foo ‘bar’ baz”</p>
.
.
'foo 'bar' baz'
.
<p>“foo ‘bar’ baz”</p>
<p>‘foo ‘bar’ baz’</p>
.
Should not overlap quotes:
.
'foo "bar' baz"
.
@ -23,7 +18,6 @@ Should not overlap quotes:
Should match quotes on the same level:
.
"foo *bar* baz"
.
@ -32,7 +26,6 @@ Should match quotes on the same level:
Should handle adjacent nested quotes:
.
'"double in single"'
@ -45,25 +38,21 @@ Should handle adjacent nested quotes:
Should not match quotes on different levels:
.
*"foo* bar"
"foo *bar"*
.
<p><em>&quot;foo</em> bar&quot;</p>
<p>&quot;foo <em>bar&quot;</em></p>
.
.
*"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>
.
Should try and find matching quote in this case:
Should try and find matching quote in this case:
.
"foo "bar 'baz"
.
@ -72,7 +61,6 @@ Should try and find matching quote in this case:
Should not touch 'inches' in quotes:
.
"Monitor 21"" and "Monitor""
.
@ -81,7 +69,6 @@ Should not touch 'inches' in quotes:
Should render an apostrophe as a rsquo:
.
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:
.
users' stuff
.

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

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

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

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

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

@ -68,17 +68,14 @@ dashes
markdownit---awesome
abc ----
.
<p>—markdownit — super—</p>
<p>markdownit—awesome</p>
<p>abc ----</p>
.
.
--markdownit -- super--
markdownit--awesome
.
<p>—markdownit — super—</p>
<p>markdownit—awesome</p>
<p>abc ----</p>
<p>–markdownit – super–</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
.
[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](&#x26;#74;avascript:alert(1))
.
<p><a href="%22%3E%3Cscript%3Ealert(%22xss%22)%3C/script%3E">xss link</a></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.
.
![xss link](javascript:alert(1))
.
@ -63,7 +59,6 @@ Image parser use the same code base.
Autolinks
.
<javascript&#x3A;alert(1)>
@ -75,7 +70,6 @@ Autolinks
Linkifier
.
javascript&#x3A;alert(1)
@ -85,8 +79,8 @@ javascript:alert(1)
<p>javascript:alert(1)</p>
.
References
References
.
[test]: javascript:alert(1)
.

Loading…
Cancel
Save