[Zope3-checkins] CVS: Zope3/src/zope/tal/tests - test_talinterpreter.py:1.6

Godefroid Chapelle gotcha at swing.be
Fri Aug 15 11:02:54 EDT 2003


Update of /cvs-repository/Zope3/src/zope/tal/tests
In directory cvs.zope.org:/tmp/cvs-serv12025/tests

Modified Files:
	test_talinterpreter.py 
Log Message:
some reformatting to ease comparisons between 2.x and 3



=== Zope3/src/zope/tal/tests/test_talinterpreter.py 1.5 => 1.6 ===
--- Zope3/src/zope/tal/tests/test_talinterpreter.py:1.5	Thu Aug 14 13:23:21 2003
+++ Zope3/src/zope/tal/tests/test_talinterpreter.py	Fri Aug 15 10:02:45 2003
@@ -247,6 +247,25 @@
         </html>''' "\n"
         self.compare(INPUT, EXPECTED)
 
+    def test_unicode_content(self):
+        INPUT = """<p tal:content="python:u'déjà-vu'">para</p>"""
+        EXPECTED = u"""<p>déjà-vu</p>""" "\n"
+        self.compare(INPUT, EXPECTED)
+
+    def test_unicode_structure(self):
+        INPUT = """<p tal:replace="structure python:u'déjà-vu'">para</p>"""
+        EXPECTED = u"""déjà-vu""" "\n"
+        self.compare(INPUT, EXPECTED)
+
+    def test_i18n_replace_number(self):
+        INPUT = """
+        <p i18n:translate="foo ${bar}">
+        <span tal:replace="python:123" i18n:name="bar">para</span>
+        </p>"""
+        EXPECTED = u"""
+        <p>FOO 123</p>""" "\n"
+        self.compare(INPUT, EXPECTED)
+
     def test_entities(self):
         INPUT = ('<img tal:define="foo nothing" '
                  'alt="&a; &#1; &#x0a; &a &#45 &; &#0a; <>" />')




More information about the Zope3-Checkins mailing list