# HG changeset patch # User cmlenz # Date 1160732108 0 # Node ID 6de057dfa90556aacf68240934e25ac6bd9470c6 # Parent bfec5a5dffbfe0967fd3e80263c93a951d3904b0 A couple for unit tests for match templates, including one that currently fails (and is commented out). diff --git a/genshi/tests/template.py b/genshi/tests/template.py --- a/genshi/tests/template.py +++ b/genshi/tests/template.py @@ -719,6 +719,52 @@
Foo
""", str(tmpl.generate())) + def test_match_with_position_predicate(self): + tmpl = MarkupTemplate(""" +

${select('*|text()')}

+ +

Foo

+

Bar

+ + """) + self.assertEqual(""" + +

Foo

+

Bar

+ + """, str(tmpl.generate())) + + def test_match_with_closure(self): + tmpl = MarkupTemplate(""" +

${select('*|text()')}

+ +

Foo

+

Bar

+ + """) + self.assertEqual(""" + +

Foo

+

Bar

+ + """, str(tmpl.generate())) + + # FIXME + #def test_match_without_closure(self): + # tmpl = MarkupTemplate(""" + #

${select('*|text()')}

+ # + #

Foo

+ #

Bar

+ # + # """) + # self.assertEqual(""" + # + #

Foo

+ #

Bar

+ # + # """, str(tmpl.generate())) + # FIXME #def test_match_after_step(self): # tmpl = MarkupTemplate("""