Added nested-list tests for covering additional cases for Parsoid.
authorSubramanya Sastry <ssastry@wikimedia.org>
Wed, 6 Jun 2012 22:16:01 +0000 (17:16 -0500)
committerSubramanya Sastry <ssastry@wikimedia.org>
Wed, 6 Jun 2012 22:16:01 +0000 (17:16 -0500)
Change-Id: Ic0ea44a5d965bfd27b34a790f18ef29f2ac20d6a

tests/parser/parserTests.txt

index f37529f..7633118 100644 (file)
@@ -2159,6 +2159,85 @@ Mixed list
 
 !! end
 
+!! test
+Nested lists 1
+!! input
+*foo
+**bar
+!! result
+<ul><li>foo
+<ul><li>bar
+</li></ul>
+</li></ul>
+
+!! end
+
+!! test
+Nested lists 2
+!! input
+**foo
+*bar
+!! result
+<ul><li><ul><li>foo
+</li></ul>
+</li><li>bar
+</li></ul>
+
+!! end
+
+!! test
+Nested lists 3 (first element empty)
+!! input
+*
+**bar
+!! result
+<ul><li>
+<ul><li>bar
+</li></ul>
+</li></ul>
+
+!! end
+
+!! test
+Nested lists 4 (first element empty)
+!! input
+**
+*bar
+!! result
+<ul><li><ul><li>
+</li></ul>
+</li><li>bar
+</li></ul>
+
+!! end
+
+!! test
+Nested lists 5 (both elements empty)
+!! input
+**
+*
+!! result
+<ul><li><ul><li>
+</li></ul>
+</li><li>
+</li></ul>
+
+!! end
+
+!! test
+Nested lists 6 (both elements empty)
+!! input
+*
+**
+!! result
+<ul><li>
+<ul><li>
+</li></ul>
+</li></ul>
+
+!! end
+
+
 !! test
 List items are not parsed correctly following a <pre> block (bug 785)
 !! input