[ZPT] CVS: Packages/TAL - test_htmlparser.py:1.9 test_htmltalparser.py:1.3

guido@digicool.com guido@digicool.com
Mon, 26 Mar 2001 11:48:34 -0500 (EST)


Update of /cvs-repository/Packages/TAL/test
In directory korak:/tmp/cvs-serv14727/test

Modified Files:
	test_htmlparser.py test_htmltalparser.py 
Log Message:
Change in HTMLParser API: attributes without a value (e.g. <img
ismap>) pass None for the value instead of the attribute name.  This
is then used to generate the same output, rather than <img
ismap="ismap">).  Includes tests.




--- Updated File test_htmlparser.py in package Packages/TAL --
--- test_htmlparser.py	2001/03/24 20:08:38	1.8
+++ test_htmlparser.py	2001/03/26 16:48:33	1.9
@@ -99,14 +99,14 @@
     def check_simple_html(self):
         self._run_check("""
 <!DOCTYPE html PUBLIC 'foo'>
-<html>&entity;&#32;
+<HTML>&entity;&#32;
 <!--comment1a
 -></foo><bar>&lt;<?pi?></foo<bar
 comment1b-->
-<img src='bar' ismap>sample
+<Img sRc='Bar' isMAP>sample
 text
 <!--comment2a-- --comment2b-->
-</html>
+</Html>
 """, [
     ("data", "\n"),
     ("decl", "DOCTYPE html PUBLIC 'foo'"),
@@ -117,7 +117,7 @@
     ("data", "\n"),
     ("comment", "comment1a\n-></foo><bar>&lt;<?pi?></foo<bar\ncomment1b"),
     ("data", "\n"),
-    ("starttag", "img", [("src", "bar"), ("ismap", "ismap")]),
+    ("starttag", "img", [("src", "Bar"), ("ismap", None)]),
     ("data", "sample\ntext\n"),
     ("comment", "comment2a-- --comment2b"),
     ("data", "\n"),
@@ -135,8 +135,8 @@
 
     def check_attr_syntax(self):
         output = [
-            ("starttag", "a", [("b", "v"), ("c", "v"), ("d", "v"), ("e", "e")])
-            ]
+          ("starttag", "a", [("b", "v"), ("c", "v"), ("d", "v"), ("e", None)])
+          ]
         self._run_check("""<a b='v' c="v" d=v e>""", output)
         self._run_check("""<a  b = 'v' c = "v" d = v e>""", output)
         self._run_check("""<a\nb\n=\n'v'\nc\n=\n"v"\nd\n=\nv\ne>""", output)

--- Updated File test_htmltalparser.py in package Packages/TAL --
--- test_htmltalparser.py	2001/03/21 22:43:46	1.2
+++ test_htmltalparser.py	2001/03/26 16:48:33	1.3
@@ -114,7 +114,7 @@
     def check_code_attr_syntax(self):
         output = [
             ('setPosition', (1, 0)),
-            ('rawtext', '<a b="v" c="v" d="v" e="e"></a>'),
+            ('rawtext', '<a b="v" c="v" d="v" e></a>'),
             ]
         self._run_check("""<a b='v' c="v" d=v e>""", output)
         self._run_check("""<a  b = 'v' c = "v" d = v e>""", output)