* unittest for mixture of different types of lists
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Mon, 7 Jan 2008 01:00:44 +0000 (01:00 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Mon, 7 Jan 2008 01:00:44 +0000 (01:00 +0000)
tests/expected/mixednestedlists-wellformed.txt [new file with mode: 0644]
tests/html/mixednestedlists-wellformed.html [new file with mode: 0644]
tests/unittests/NestedListTests.py

diff --git a/tests/expected/mixednestedlists-wellformed.txt b/tests/expected/mixednestedlists-wellformed.txt
new file mode 100644 (file)
index 0000000..86e83fc
--- /dev/null
@@ -0,0 +1,19 @@
+ * Fun is on the way
+     1. Honest
+     2. It really is
+        * And it's fun
+        * We should have at least one silly long line to check that
+          wrapping works like we expect otherwise what's the point
+
+   What is HTML2Text?::
+
+   HTML2Text is a funky bit of python that translates HTML fragments
+   in to plain text in a human readable format. It's primary use was
+   for generating the plain text body of email messages generated from
+   rssfeeds as part of rss2maildir.
+
+   Hopefully one day it'll be good enough that other people will want
+   to use it!
+
+   Who wrote it?::
+       HTML2Text was written by Brett Parker.
diff --git a/tests/html/mixednestedlists-wellformed.html b/tests/html/mixednestedlists-wellformed.html
new file mode 100644 (file)
index 0000000..d862fc5
--- /dev/null
@@ -0,0 +1,22 @@
+<ul>
+    <li>Fun is on the way
+        <ol>
+            <li>Honest</li>
+            <li>It really is
+                <ul>
+                    <li>And it's fun</li>
+                    <li>We should have at least one silly long line to check that wrapping works like we expect otherwise what's the point</li>
+                </ul>
+            </li>
+        </ol>
+        <dl>
+            <dt>What is HTML2Text?</dt>
+            <dd>
+                <p>HTML2Text is a funky bit of python that translates HTML fragments in to plain text in a human readable format. It's primary use was for generating the plain text body of email messages generated from rssfeeds as part of rss2maildir.</p>
+                <p>Hopefully one day it'll be good enough that other people will want to use it!</p>
+            </dd>
+            <dt>Who wrote it?</dt>
+            <dd>HTML2Text was written by Brett Parker.</dd>
+        </dl>
+    </li>
+</ul>
index 1e4ccf54ee98a06e3e90216e57a8a47fe0542f57..22540df04c1255e4a572285f2b915272ef71d3a4 100755 (executable)
@@ -13,10 +13,14 @@ class NestedListTests(ParsingTests.ParsingTest):
     def testWellFormedNestedOrderedLists(self):
         return self.runParsingTest("nestedorderedlists-wellformed")
 
     def testWellFormedNestedOrderedLists(self):
         return self.runParsingTest("nestedorderedlists-wellformed")
 
+    def testWellFormedMixedNestedLists(self):
+        return self.runParsingTest("mixednestedlists-wellformed")
+
 def suite():
     suite = unittest.TestSuite()
     suite.addTest(NestedListTests("testWellFormedNestedLists"))
     suite.addTest(NestedListTests("testWellFormedNestedOrderedLists"))
 def suite():
     suite = unittest.TestSuite()
     suite.addTest(NestedListTests("testWellFormedNestedLists"))
     suite.addTest(NestedListTests("testWellFormedNestedOrderedLists"))
+    suite.addTest(NestedListTests("testWellFormedMixedNestedLists"))
     return suite
 
 if __name__ == "__main__":
     return suite
 
 if __name__ == "__main__":