- Commit
- ed990f56553f4c144c57cdff85aaa1c437ba8be2
- Parent
- c739195a341787f89960c5938e4def8d54f66a5a
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Merge pull request #230 from mity/more-pathological-tests
Add more pathological tests.
My personal build of CMark ✏️
Merge pull request #230 from mity/more-pathological-tests
Add more pathological tests.
1 file changed, 10 insertions, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | test/pathological_tests.py | 11 | 10 | 1 |
diff --git a/test/pathological_tests.py b/test/pathological_tests.py @@ -58,7 +58,16 @@ pathological = { 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\]\(<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+/')