Skip to content

Commit

Permalink
Merge pull request #230 from mity/more-pathological-tests
Browse files Browse the repository at this point in the history
Add more pathological tests.
  • Loading branch information
jgm authored Nov 5, 2017
2 parents c739195 + 99c5675 commit ed990f5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/pathological_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,16 @@
re.compile("abc\ufffd?de\ufffd?")),
"backticks":
("".join(map(lambda x: ("e" + "`" * x), range(1,10000))),
re.compile("^<p>[e`]*</p>\n$"))
re.compile("^<p>[e`]*</p>\n$")),
"unclosed links A":
("[a](<b" * 50000,
re.compile("(\[a\]\(&lt;b){50000}")),
"unclosed links B":
("[a](b" * 50000,
re.compile("(\[a\]\(b){50000}")),
"many references":
("".join(map(lambda x: ("[" + str(x) + "]: u\n"), range(1,50000 * 16))) + "[0] " * 50000,
re.compile("(\[0\] ){49999}"))
}

whitespace_re = re.compile('/s+/')
Expand Down

0 comments on commit ed990f5

Please sign in to comment.