[Zope3-checkins] CVS: Zope3/src/zope/tal/tests - test_htmltalparser.py:1.4
Fred L. Drake, Jr.
fred@zope.com
Fri, 4 Apr 2003 11:05:45 -0500
Update of /cvs-repository/Zope3/src/zope/tal/tests
In directory cvs.zope.org:/tmp/cvs-serv30618/tests
Modified Files:
test_htmltalparser.py
Log Message:
- make the bytecode generator check that i18n:name values are valid
- check that attributes are not specified more than once in an
i18n:attributes value, and normalize case of the attribute names in
HTML mode
=== Zope3/src/zope/tal/tests/test_htmltalparser.py 1.3 => 1.4 ===
--- Zope3/src/zope/tal/tests/test_htmltalparser.py:1.3 Mon Mar 31 14:15:56 2003
+++ Zope3/src/zope/tal/tests/test_htmltalparser.py Fri Apr 4 11:05:44 2003
@@ -501,6 +501,14 @@
('endScope', ()),
])
+ def test_i18n_name_bad_name(self):
+ self._should_error("<span i18n:name='not a valid name' />")
+ self._should_error("<span i18n:name='-bad-name' />")
+
+ def test_i18n_attributes_repeated_attr(self):
+ self._should_error("<a i18n:attributes='href; href' />")
+ self._should_error("<a i18n:attributes='href; HREF' />")
+
def test_i18n_translate(self):
# input/test19.html
self._run_check('''\