Skip to content

Commit 9e687bf

Browse files
committed
Add html closing comment tags test cases
Handle the test cases mentioned in python#102555
1 parent eafb2d2 commit 9e687bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_htmlparser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ def test_comments(self):
329329
'<!-->'
330330
'<!--<!--->'
331331
'<!--And I am so-called incorrectly-closed-comment--!>'
332+
'<!--!>'
333+
'<!---!>'
332334
'<!--I have invalid attempt to close (space) -- >-->'
333335
'<!--Me too (invalid character) --x>-->'
334336
'<!--Me too (invalid characters) --cheese>-->')
@@ -343,6 +345,8 @@ def test_comments(self):
343345
('comment', ''),
344346
('comment', '<!-'),
345347
('comment', 'And I am so-called incorrectly-closed-comment'),
348+
('comment', ''),
349+
('comment', ''),
346350
('comment', 'I have invalid attempt to close (space) -- >'),
347351
('comment', 'Me too (invalid character) --x>'),
348352
('comment', 'Me too (invalid characters) --cheese>')

0 commit comments

Comments
 (0)