diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-04-18 19:08:41 -0600 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-04-18 19:08:41 -0600 |
commit | c45868ec697a70a80d1cf8a511894f073fda3a27 (patch) | |
tree | 1f8e79a1d86c7efa99e160ecda477eab7a14b27b /Lib/test/test_htmlparser.py | |
parent | a72aa843b66e80cc6f97a5e3571952d941e82404 (diff) | |
download | cpython-git-c45868ec697a70a80d1cf8a511894f073fda3a27.tar.gz |
#14538: HTMLParser can now parse correctly start tags that contain a bare /.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r-- | Lib/test/test_htmlparser.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 41f43408d8..8cc461f1ee 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -260,6 +260,16 @@ text ('starttag', 'a', [('foo', None), ('=', None), ('bar', None)]) ] self._run_check(html, expected) + #see issue #14538 + html = ('<meta><meta / ><meta // ><meta / / >' + '<meta/><meta /><meta //><meta//>') + expected = [ + ('starttag', 'meta', []), ('starttag', 'meta', []), + ('starttag', 'meta', []), ('starttag', 'meta', []), + ('startendtag', 'meta', []), ('startendtag', 'meta', []), + ('startendtag', 'meta', []), ('startendtag', 'meta', []), + ] + self._run_check(html, expected) def test_declaration_junk_chars(self): self._run_check("<!DOCTYPE foo $ >", [('decl', 'DOCTYPE foo $ ')]) |