diff options
author | R. Tyler Ballance <tyler@monkeypox.org> | 2009-12-14 23:13:10 -0800 |
---|---|---|
committer | R. Tyler Ballance <tyler@monkeypox.org> | 2009-12-14 23:35:40 -0800 |
commit | 5cd02208b268958e3c28a338d32041abc82a9b85 (patch) | |
tree | ddbc7ed7e1241a4b81de72a0e9eee2976e7fb056 | |
parent | f45b9f070934fcb4fc6809ed90b89a25f90ea222 (diff) | |
download | python-cheetah-5cd02208b268958e3c28a338d32041abc82a9b85.tar.gz |
Add another unicode test
This is based off an IRC conversation in #cheetah which I've
honestly forgotten what the bug was when I wrote the test case.
Pech gehabt.
-rw-r--r-- | cheetah/Tests/Unicode.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cheetah/Tests/Unicode.py b/cheetah/Tests/Unicode.py index 315f6d1..c8b3955 100644 --- a/cheetah/Tests/Unicode.py +++ b/cheetah/Tests/Unicode.py @@ -194,5 +194,33 @@ class Unicode_in_SearchList_Test(CommandLineTest): assert template.respond() +class InlineSpanishTest(unittest.TestCase): + def runTest(self): + template = ''' +#encoding utf-8 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <title>Pagina del vendedor</title> + </head> + <body> + $header + <h2>Bienvenido $nombre.</h2> + <br /><br /><br /> + <center> + Usted tiene $numpedidos_noconf <a href="">pedidós</a> sin confirmar. + <br /><br /> + Bodega tiene fecha para $numpedidos_bodega <a href="">pedidos</a>. + </center> + </body> +</html> + ''' + template = Template(template, searchList=[{'header' : '', + 'nombre' : '', 'numpedidos_bodega' : '', + 'numpedidos_noconf' : ''}]) + assert unicode(template) + + if __name__ == '__main__': unittest.main() |