Commit 81e2a5cac2c8c2b1f8fe63b7bce3fe7e516e2891

Martin Mitas 2018-04-12T17:03:37

pathological_tests.py: Test deeply nested lists.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/test/pathological_tests.py b/test/pathological_tests.py
index 4f0e31b..309e7c2 100755
--- a/test/pathological_tests.py
+++ b/test/pathological_tests.py
@@ -64,7 +64,10 @@ pathological = {
                   re.compile("(<a href=\"/u\">t</a> ?){50000}")),
     "many references":
                  ("".join(map(lambda x: ("[" + str(x) + "]: u\n"), range(1,50000 * 16))) + "[0] " * 50000,
-                  re.compile("(\[0\] ){49999}"))
+                  re.compile("(\[0\] ){49999}")),
+    "deeply nested lists":
+                 ("".join(map(lambda x: ("  " * x + "* a\n"), range(0,1000))),
+                  re.compile("<ul>\n(<li>a<ul>\n){999}<li>a</li>\n</ul>\n(</li>\n</ul>\n){999}"))
     }
 
 whitespace_re = re.compile('/s+/')