diff genshi/template/tests/text.py @ 512:bdaf75981ec7

Fix for #125 (text template handling unicode source). Thanks to Christian Boos for the patch.
author cmlenz
date Wed, 06 Jun 2007 11:31:44 +0000
parents bb939ed3058c
children 7145e4eba2ec f0bb2c5ea0ff
line wrap: on
line diff
--- a/genshi/template/tests/text.py
+++ b/genshi/template/tests/text.py
@@ -54,6 +54,11 @@
         tmpl = TextTemplate(text, encoding='iso-8859-1')
         self.assertEqual(u'x\xf6y', unicode(tmpl.generate(foo='x', bar='y')))
 
+    def test_unicode_input(self):
+        text = u'$foo\xf6$bar'
+        tmpl = TextTemplate(text)
+        self.assertEqual(u'x\xf6y', unicode(tmpl.generate(foo='x', bar='y')))
+
     def test_empty_lines1(self):
         tmpl = TextTemplate("""Your items:
 
Copyright (C) 2012-2017 Edgewall Software