diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-04-19 01:18:22 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-04-19 01:18:22 (GMT) |
commit | 0780b6bc58c107a8462760163403642e889ef735 (patch) | |
tree | 20cc44f227b4363f3dfbd56de3c888e795d7c3f1 /Lib/test | |
parent | cc19140607e0a1dd98e229a7b6a21c4e05f0eb29 (diff) | |
download | cpython-0780b6bc58c107a8462760163403642e889ef735.zip cpython-0780b6bc58c107a8462760163403642e889ef735.tar.gz cpython-0780b6bc58c107a8462760163403642e889ef735.tar.bz2 |
#14538: HTMLParser can now parse correctly start tags that contain a bare /.
Diffstat (limited to 'Lib/test')
-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 3e2a590..c4f80cc 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -409,6 +409,16 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase): ('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 $ ')]) |