[Zope3-checkins] CVS: Zope3/src/zope/tal/tests - test_htmltalparser.py:1.3

Fred L. Drake, Jr. fred@zope.com
Mon, 31 Mar 2003 14:16:26 -0500


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

Modified Files:
	test_htmltalparser.py 
Log Message:
Update i18n:attributes to support explicit message IDs.

=== Zope3/src/zope/tal/tests/test_htmltalparser.py 1.2 => 1.3 ===
--- Zope3/src/zope/tal/tests/test_htmltalparser.py:1.2	Wed Dec 25 09:15:31 2002
+++ Zope3/src/zope/tal/tests/test_htmltalparser.py	Mon Mar 31 14:15:56 2003
@@ -391,11 +391,11 @@
              {'tal:attributes': 'href string:http://www.zope.org; x string:y',
               'name': 'bar', 'href': 'foo'}),
             ('startTag', ('a',
-             [('href', 'foo', 'replace', '$string:http://www.zope.org$', 0),
+             [('href', 'foo', 'replace', '$string:http://www.zope.org$', 0, None),
               ('name', 'name="bar"'),
               ('tal:attributes',
                'href string:http://www.zope.org; x string:y', 'tal'),
-              ('x', None, 'insert', '$string:y$', 0)])),
+              ('x', None, 'insert', '$string:y$', 0, None)])),
             ('endScope', ()),
             rawtext('link</a>'),
             ])
@@ -409,7 +409,7 @@
               'tal:replace': 'structure string:<img>'}),
             ('insertStructure',
              ('$string:<img>$',
-              {'src': ('$string:foo.png$', 0)},
+              {'src': ('$string:foo.png$', 0, None)},
               [('startTag', ('p',
                              [('tal:replace', 'structure string:<img>', 'tal'),
                               ('tal:attributes', 'src string:foo.png',
@@ -487,8 +487,17 @@
             ('setPosition', (1, 0)),
             ('beginScope', {'alt': 'foo', 'i18n:attributes': 'alt'}),
             ('startTag', ('img',
-             [('alt', 'foo', 'replace', None, 1),
+             [('alt', 'foo', 'replace', None, 1, None),
               ('i18n:attributes', 'alt', 'i18n')])),
+            ('endScope', ()),
+            ])
+        self._run_check("<img alt='foo' i18n:attributes='alt foo ; bar'>", [
+            ('setPosition', (1, 0)),
+            ('beginScope', {'alt': 'foo', 'i18n:attributes': 'alt foo ; bar'}),
+            ('startTag', ('img',
+             [('alt', 'foo', 'replace', None, 1, 'foo'),
+              ('i18n:attributes', 'alt foo ; bar', 'i18n'),
+              ('bar', None, 'insert', None, 1, None)])),
             ('endScope', ()),
             ])