[ZPT] CVS: Packages/TAL - test_htmlparser.py:1.12

fred@digicool.com fred@digicool.com
Fri, 6 Apr 2001 18:19:16 -0400 (EDT)


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

Modified Files:
	test_htmlparser.py 
Log Message:

Added a test case to make sure <script> and <style> elements are handled
correctly.



--- Updated File test_htmlparser.py in package Packages/TAL --
--- test_htmlparser.py	2001/04/06 19:55:23	1.11
+++ test_htmlparser.py	2001/04/06 22:19:14	1.12
@@ -241,6 +241,20 @@
             ("starttag", "foo:bar", [("one", "1"), ("two", "2")]),
             ("starttag_text", s)])
 
+    def check_cdata_content(self):
+        s = """<script> <!-- not a comment --> &not-an-entity-ref; </script>"""
+        self._run_check(s, [
+            ("starttag", "script", []),
+            ("data", " <!-- not a comment --> &not-an-entity-ref; "),
+            ("endtag", "script"),
+            ])
+        s = """<script> <not a='start tag'> </script>"""
+        self._run_check(s, [
+            ("starttag", "script", []),
+            ("data", " <not a='start tag'> "),
+            ("endtag", "script"),
+            ])
+
 
 # Support for the Zope regression test framework:
 def test_suite():