Add a test for an uncovered bullet in a deeply nested list
authorGabriel Wicke <gwicke@wikimedia.org>
Wed, 7 Nov 2012 23:17:22 +0000 (15:17 -0800)
committerGabriel Wicke <gwicke@wikimedia.org>
Wed, 7 Nov 2012 23:17:22 +0000 (15:17 -0800)
Also document testing issues in this area in a comment.

Change-Id: I2f753764e3aa2f9d4bbd146f48b43021a5b07c63

tests/parser/parserTests.txt

index 2fa8a50..8e7f44e 100644 (file)
@@ -10331,6 +10331,29 @@ Bug 529: Uncovered bullet
 
 !! end
 
+# Plain MediaWiki does not remove empty lists, but tidy actually does.
+# Templates in Wikipedia rely on this behavior, as tidy has always been
+# enabled there. These tests are normally run *without* tidy, so specify the
+# full output here. 
+# To test realistic parsing behavior, apply a tidy-like transformation to both
+# the expected output and your parser's output.
+!! test
+Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
+!! input
+******* Foo {{bullet}}
+!! result
+<ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo 
+</li></ul>
+</li></ul>
+</li></ul>
+</li></ul>
+</li></ul>
+</li></ul>
+</li><li> Bar
+</li></ul>
+
+!! end
+
 !! test
 Bug 529: Uncovered table already at line-start
 !! input