Edgewall Software

Ticket #370: fail_with_more_complicated_conditions.patch

File fail_with_more_complicated_conditions.patch, 1.2 KB (added by Felix Schwarz <felix.schwarz@…>, 13 years ago)
  • genshi/template/tests/directives.py

    diff -r c0b391a18df3 genshi/template/tests/directives.py
    a b  
    10041004          <body>
    10051005          </body>
    10061006        </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)
    10071030
    10081031    # FIXME
    10091032    #def test_match_after_step(self):