Mercurial > genshi > mirror
diff markup/tests/template.py @ 74:d54b5fd60b52 trunk
Fix expression interpolation where both shorthand notation and full notation are used inside a single text node. Thanks Jonas.
author | cmlenz |
---|---|
date | Wed, 12 Jul 2006 19:45:13 +0000 |
parents | 59eb24184e9c |
children | 3722696d0343 |
line wrap: on
line diff
--- a/markup/tests/template.py +++ b/markup/tests/template.py @@ -411,6 +411,11 @@ self.assertEqual(Stream.TEXT, parts[2][0]) self.assertEqual(' baz', parts[2][1]) + def test_interpolate_mixed3(self): + ctxt = Context(var=42) + tmpl = Template('<root> ${var} $var</root>') + self.assertEqual('<root> 42 42</root>', str(tmpl.generate(ctxt))) + def test_interpolate_non_string_attrs(self): ctxt = Context() tmpl = Template('<root attr="${1}"/>')