Commit 7f44e1ad6c30ea72ddd06897c11ee6e9ac14dd67

Martin Mitas 2022-01-10T10:39:29

pathological_tests.py: Improve code alignment.

diff --git a/test/pathological_tests.py b/test/pathological_tests.py
index ad9252e..a7e1a33 100755
--- a/test/pathological_tests.py
+++ b/test/pathological_tests.py
@@ -22,78 +22,78 @@ cmark = CMark(prog=args.program, library_dir=args.library_dir)
 pathological = {
     # note - some pythons have limit of 65535 for {num-matches} in re.
     "U+0000":
-                 ("abc\u0000de\u0000",
-                  re.compile("abc\ufffd?de\ufffd?")),
+            ("abc\u0000de\u0000",
+            re.compile("abc\ufffd?de\ufffd?")),
     "U+FEFF (Unicode BOM)":
-                 ("\ufefffoo",
-                  re.compile("<p>foo</p>")),
+            ("\ufefffoo",
+            re.compile("<p>foo</p>")),
     "nested strong emph":
-                (("*a **a " * 65000) + "b" + (" a** a*" * 65000),
-                 re.compile("(<em>a <strong>a ){65000}b( a</strong> a</em>){65000}")),
+            (("*a **a " * 65000) + "b" + (" a** a*" * 65000),
+            re.compile("(<em>a <strong>a ){65000}b( a</strong> a</em>){65000}")),
     "many emph closers with no openers":
-                 (("a_ " * 65000),
-                  re.compile("(a[_] ){64999}a_")),
+            (("a_ " * 65000),
+            re.compile("(a[_] ){64999}a_")),
     "many emph openers with no closers":
-                 (("_a " * 65000),
-                  re.compile("(_a ){64999}_a")),
+            (("_a " * 65000),
+            re.compile("(_a ){64999}_a")),
     "many 3-emph openers with no closers":
-                 (("a***" * 65000),
-                  re.compile("(a<em><strong>a</strong></em>){32500}")),
+            (("a***" * 65000),
+            re.compile("(a<em><strong>a</strong></em>){32500}")),
     "many link closers with no openers":
-                 (("a]" * 65000),
-                  re.compile("(a\]){65000}")),
+            (("a]" * 65000),
+            re.compile("(a\]){65000}")),
     "many link openers with no closers":
-                 (("[a" * 65000),
-                  re.compile("(\[a){65000}")),
+            (("[a" * 65000),
+            re.compile("(\[a){65000}")),
     "mismatched openers and closers":
-                 (("*a_ " * 50000),
-                  re.compile("([*]a[_] ){49999}[*]a_")),
+            (("*a_ " * 50000),
+            re.compile("([*]a[_] ){49999}[*]a_")),
     "openers and closers multiple of 3":
-                 (("a**b" + ("c* " * 50000)),
-                  re.compile("a[*][*]b(c[*] ){49999}c[*]")),
+            (("a**b" + ("c* " * 50000)),
+            re.compile("a[*][*]b(c[*] ){49999}c[*]")),
     "link openers and emph closers":
-                 (("[ a_" * 50000),
-                  re.compile("(\[ a_){50000}")),
+            (("[ a_" * 50000),
+            re.compile("(\[ a_){50000}")),
     "hard link/emph case":
-                 ("**x [a*b**c*](d)",
-                  re.compile("\\*\\*x <a href=\"d\">a<em>b\\*\\*c</em></a>")),
+            ("**x [a*b**c*](d)",
+            re.compile("\\*\\*x <a href=\"d\">a<em>b\\*\\*c</em></a>")),
     "nested brackets":
-                 (("[" * 50000) + "a" + ("]" * 50000),
-                  re.compile("\[{50000}a\]{50000}")),
+            (("[" * 50000) + "a" + ("]" * 50000),
+            re.compile("\[{50000}a\]{50000}")),
     "nested block quotes":
-                 ((("> " * 50000) + "a"),
-                  re.compile("(<blockquote>\r?\n){50000}")),
+            ((("> " * 50000) + "a"),
+            re.compile("(<blockquote>\r?\n){50000}")),
     "backticks":
-                 ("".join(map(lambda x: ("e" + "`" * x), range(1,1000))),
-                  re.compile("^<p>[e`]*</p>\r?\n$")),
+            ("".join(map(lambda x: ("e" + "`" * x), range(1,1000))),
+            re.compile("^<p>[e`]*</p>\r?\n$")),
     "many links":
-                 ("[t](/u) " * 50000,
-                  re.compile("(<a href=\"/u\">t</a> ?){50000}")),
+            ("[t](/u) " * 50000,
+            re.compile("(<a href=\"/u\">t</a> ?){50000}")),
     "many references":
-                 ("".join(map(lambda x: ("[" + str(x) + "]: u\n"), range(1,20000 * 16))) + "[0] " * 20000,
-                  re.compile("(\[0\] ){19999}")),
+            ("".join(map(lambda x: ("[" + str(x) + "]: u\n"), range(1,20000 * 16))) + "[0] " * 20000,
+            re.compile("(\[0\] ){19999}")),
     "deeply nested lists":
-                 ("".join(map(lambda x: ("  " * x + "* a\n"), range(0,1000))),
-                  re.compile("<ul>\r?\n(<li>a<ul>\r?\n){999}<li>a</li>\r?\n</ul>\r?\n(</li>\r?\n</ul>\r?\n){999}")),
+            ("".join(map(lambda x: ("  " * x + "* a\n"), range(0,1000))),
+            re.compile("<ul>\r?\n(<li>a<ul>\r?\n){999}<li>a</li>\r?\n</ul>\r?\n(</li>\r?\n</ul>\r?\n){999}")),
     "many html openers and closers":
-                 (("<>" * 50000),
-                  re.compile("(&lt;&gt;){50000}")),
+            (("<>" * 50000),
+            re.compile("(&lt;&gt;){50000}")),
     "many html proc. inst. openers":
-                 (("x" + "<?" * 50000),
-                  re.compile("x(&lt;\\?){50000}")),
+            (("x" + "<?" * 50000),
+            re.compile("x(&lt;\\?){50000}")),
     "many html CDATA openers":
-                 (("x" + "<![CDATA[" * 50000),
-                  re.compile("x(&lt;!\\[CDATA\\[){50000}")),
+            (("x" + "<![CDATA[" * 50000),
+            re.compile("x(&lt;!\\[CDATA\\[){50000}")),
     "many backticks and escapes":
-                 (("\\``" * 50000),
-                  re.compile("(``){50000}")),
+            (("\\``" * 50000),
+            re.compile("(``){50000}")),
     "many broken link titles":
-                 (("[ (](" * 50000),
-                  re.compile("(\[ \(\]\(){50000}")),
+            (("[ (](" * 50000),
+            re.compile("(\[ \(\]\(){50000}")),
     "broken thematic break":
-                 (("* " * 50000 + "a"),
-                  re.compile("<ul>\r?\n(<li><ul>\r?\n){49999}<li>a</li>\r?\n</ul>\r?\n(</li>\r?\n</ul>\r?\n){49999}"))
-    }
+            (("* " * 50000 + "a"),
+            re.compile("<ul>\r?\n(<li><ul>\r?\n){49999}<li>a</li>\r?\n</ul>\r?\n(</li>\r?\n</ul>\r?\n){49999}"))
+}
 
 whitespace_re = re.compile('/s+/')
 passed = 0