diff -r c0b391a18df3 genshi/template/tests/directives.py
|
a
|
b
|
|
| 1004 | 1004 | <body> |
| 1005 | 1005 | </body> |
| 1006 | 1006 | </html>""", tmpl.generate().render()) |
| | 1007 | |
| | 1008 | def test_triple_match_with_more_complicated_path_still_matches(self): |
| | 1009 | tmpl = MarkupTemplate(""" |
| | 1010 | <html xmlns="http://www.w3.org/1999/xhtml" |
| | 1011 | xmlns:py="http://genshi.edgewall.org/"> |
| | 1012 | |
| | 1013 | <py:match path="div//*[@id='fnord']" buffer="false">FOO</py:match> |
| | 1014 | |
| | 1015 | <py:match path="body" buffer="false"> |
| | 1016 | <body>${select('*|text()')}</body> |
| | 1017 | </py:match> |
| | 1018 | |
| | 1019 | <py:match path="body" buffer="false"> |
| | 1020 | <body>${select('*|text()')}</body> |
| | 1021 | </py:match> |
| | 1022 | |
| | 1023 | <body> |
| | 1024 | <div id="fnord" /> |
| | 1025 | </body> |
| | 1026 | </html> |
| | 1027 | """) |
| | 1028 | html = tmpl.generate().render('xhtml', doctype='xhtml') |
| | 1029 | self.assertTrue('FOO' in html, html) |
| 1007 | 1030 | |
| 1008 | 1031 | # FIXME |
| 1009 | 1032 | #def test_match_after_step(self): |