diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-04-18 19:18:22 -0600 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-04-18 19:18:22 -0600 |
commit | 0780b6bc58c107a8462760163403642e889ef735 (patch) | |
tree | 20cc44f227b4363f3dfbd56de3c888e795d7c3f1 /Lib/test/test_htmlparser.py | |
parent | cc19140607e0a1dd98e229a7b6a21c4e05f0eb29 (diff) | |
download | cpython-git-0780b6bc58c107a8462760163403642e889ef735.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 3e2a59064e..c4f80cca30 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 $ ')]) |