diff options
Diffstat (limited to 'test/pathological_tests.py')
-rw-r--r-- | test/pathological_tests.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/pathological_tests.py b/test/pathological_tests.py index 613f2e5..e96c333 100644 --- a/test/pathological_tests.py +++ b/test/pathological_tests.py @@ -48,6 +48,9 @@ pathological = { "link openers and emph closers": (("[ a_" * 50000), re.compile("(\[ a_){50000}")), + "pattern [ (]( repeated": + (("[ (](" * 80000), + re.compile("(\[ \(\]\(){80000}")), "hard link/emph case": ("**x [a*b**c*](d)", re.compile("\\*\\*x <a href=\"d\">a<em>b\\*\\*c</em></a>")), @@ -57,21 +60,24 @@ pathological = { "nested block quotes": ((("> " * 50000) + "a"), re.compile("(<blockquote>\n){50000}")), + "deeply nested lists": + ("".join(map(lambda x: (" " * x + "* a\n"), range(0,1000))), + re.compile("<ul>\n(<li>a\n<ul>\n){999}<li>a</li>\n</ul>\n(</li>\n</ul>\n){999}")), "U+0000 in input": ("abc\u0000de\u0000", re.compile("abc\ufffd?de\ufffd?")), "backticks": - ("".join(map(lambda x: ("e" + "`" * x), range(1,10000))), + ("".join(map(lambda x: ("e" + "`" * x), range(1,5000))), re.compile("^<p>[e`]*</p>\n$")), "unclosed links A": - ("[a](<b" * 50000, - re.compile("(\[a\]\(<b){50000}")), + ("[a](<b" * 30000, + re.compile("(\[a\]\(<b){30000}")), "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}")) + ("[a](b" * 30000, + re.compile("(\[a\]\(b){30000}")), +# "many references": +# ("".join(map(lambda x: ("[" + str(x) + "]: u\n"), range(1,5000 * 16))) + "[0] " * 5000, +# re.compile("(\[0\] ){4999}")) } whitespace_re = re.compile('/s+/') |