Mercurial > genshi > mirror
diff genshi/template/tests/markup.py @ 703:af57b12e3dd2 experimental-match-fastpaths
merge in trunk up through r818 - fundamentally changed the way MatchSet works, but actually is more consistent now
author | aflett |
---|---|
date | Mon, 31 Mar 2008 22:47:50 +0000 |
parents | f3bc1de7138d |
children | fc6d9d2a3527 d143dd73789b |
line wrap: on
line diff
--- a/genshi/template/tests/markup.py +++ b/genshi/template/tests/markup.py @@ -611,6 +611,22 @@ </body> </html>""", tmpl.generate().render()) + def test_with_in_match(self): + xml = ("""<html xmlns:py="http://genshi.edgewall.org/"> + <py:match path="body/p"> + <h1>${select('text()')}</h1> + ${select('.')} + </py:match> + <body><p py:with="foo='bar'">${foo}</p></body> + </html>""") + tmpl = MarkupTemplate(xml, filename='test.html') + self.assertEqual("""<html> + <body> + <h1>bar</h1> + <p>bar</p> + </body> + </html>""", tmpl.generate().render()) + def test_nested_include_matches(self): # See ticket #157 dirname = tempfile.mkdtemp(suffix='genshi_test')