[Zope3-checkins] CVS: Zope3/lib/python/Zope/TAL/tests - test_talinterpreter.py:1.6
Godefroid Chapelle
gotcha@swing.be
Tue, 17 Dec 2002 05:21:00 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/TAL/tests
In directory cvs.zope.org:/tmp/cvs-serv30689/tests
Modified Files:
test_talinterpreter.py
Log Message:
port of fixes for #451 #468 #721 from Zope 2 collector
=== Zope3/lib/python/Zope/TAL/tests/test_talinterpreter.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/TAL/tests/test_talinterpreter.py:1.5 Wed Jun 12 11:39:07 2002
+++ Zope3/lib/python/Zope/TAL/tests/test_talinterpreter.py Tue Dec 17 05:20:30 2002
@@ -98,12 +98,21 @@
attributes=", so" the="output" needs="to"
be="line" wrapped=".">
</html>''' "\n"
+ self.compare(INPUT, EXPECTED)
+
+ def check_entities(self):
+ INPUT = ('<img tal:define="foo nothing" '
+ 'alt="&a;  
 &a - &; �a; <>" />')
+ EXPECTED = ('<img alt="&a;  
 '
+ '&a &#45 &; &#0a; <>" />\n')
+ self.compare(INPUT, EXPECTED)
+
+ def compare(self, INPUT, EXPECTED):
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()