[Zope-Checkins] CVS: Zope/lib/python/TAL/tests - test_talinterpreter.py:1.3.100.2

Andy McKay andy@agmweb.ca
Mon, 23 Dec 2002 12:28:55 -0500


Update of /cvs-repository/Zope/lib/python/TAL/tests
In directory cvs.zope.org:/tmp/cvs-serv32535

Modified Files:
      Tag: Zope-2_6-branch
	test_talinterpreter.py 
Log Message:
Test for #735


=== Zope/lib/python/TAL/tests/test_talinterpreter.py 1.3.100.1 => 1.3.100.2 ===
--- Zope/lib/python/TAL/tests/test_talinterpreter.py:1.3.100.1	Wed Sep 18 10:54:13 2002
+++ Zope/lib/python/TAL/tests/test_talinterpreter.py	Mon Dec 23 12:28:55 2002
@@ -86,7 +86,15 @@
         interp()
         self.assertEqual(sio.getvalue(), EXPECTED)
 
-
+    def check_escaping(self):
+        INPUT = """<p tal:content="python:chr(34)+'<>&'" />"""
+        EXPECTED = "<p>&quot;&lt;&gt;&amp;</p>\n"
+        program, macros = self._compile(INPUT)
+        sio = StringIO()
+        interp = TALInterpreter(program, {}, DummyEngine(), sio, wrap=60)
+        interp()
+        self.assertEqual(sio.getvalue(), EXPECTED)
+       
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(MacroErrorsTestCase, "check_"))