changeset 834:fbcb799ee03b

Added XPath unit test for #234.
author cmlenz
date Tue, 17 Mar 2009 14:35:12 +0000
parents b5c9b92b0bd6
children 155c499496fe
files genshi/tests/path.py
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/tests/path.py
+++ b/genshi/tests/path.py
@@ -213,6 +213,19 @@
             input = xml,
             output = '<td>1</td><td>2</td>'
         )
+        xml = XML('''('<ul>
+            <li>item1
+                <ul><li>subitem11</li></ul>
+            </li>
+            <li>item2
+                <ul><li>subitem21</li></ul>
+            </li>
+        </ul>''')
+        self._test_eval(
+            path = 'li[2]/ul',
+            input = xml,
+            output = '<ul><li>subitem21</li></ul>'
+        )
 
     def test_2step_text(self):
         xml = XML('<root><item>Foo</item></root>')
Copyright (C) 2012-2017 Edgewall Software