Mercurial > genshi > mirror
diff genshi/tests/template.py @ 241:4d81439bc097 trunk
* Added basic documentation for the text-based template language.
* Directives in text templates are now closed with a simple `#end` line instead of the longer `#end<name>`.
author | cmlenz |
---|---|
date | Wed, 13 Sep 2006 14:52:58 +0000 |
parents | 88ec2b306296 |
children | 71062601458a |
line wrap: on
line diff
--- a/genshi/tests/template.py +++ b/genshi/tests/template.py @@ -233,14 +233,14 @@ tmpl = TextTemplate("""#choose #when 1 == 1 1 - #endwhen + #end #when 2 == 2 2 - #endwhen + #end #when 3 == 3 3 - #endwhen - #endchoose""") + #end + #end""") self.assertEqual(""" 1\n""", str(tmpl.generate())) @@ -367,7 +367,7 @@ tmpl = TextTemplate(""" #def echo(greeting, name='world') ${greeting}, ${name}! - #enddef + #end ${echo('Hi', name='you')} """) self.assertEqual(""" Hi, you!