#12008: add a test.
This commit is contained in:
parent
7de56f6a04
commit
18b0e5b79b
|
@ -377,6 +377,30 @@ class HTMLParserTolerantTestCase(TestCaseBase):
|
|||
('endtag', 'html')],
|
||||
collector = self.collector)
|
||||
|
||||
def test_with_unquoted_attributes(self):
|
||||
html = ("<html><body bgcolor=d0ca90 text='181008'>"
|
||||
"<table cellspacing=0 cellpadding=1 width=100% ><tr>"
|
||||
"<td align=left><font size=-1>"
|
||||
"- <a href=/rabota/><span class=en> software-and-i</span></a>"
|
||||
"- <a href='/1/'><span class=en> library</span></a></table>")
|
||||
expected = [
|
||||
('starttag', 'html', []),
|
||||
('starttag', 'body', [('bgcolor', 'd0ca90'), ('text', '181008')]),
|
||||
('starttag', 'table',
|
||||
[('cellspacing', '0'), ('cellpadding', '1'), ('width', '100%')]),
|
||||
('starttag', 'tr', []),
|
||||
('starttag', 'td', [('align', 'left')]),
|
||||
('starttag', 'font', [('size', '-1')]),
|
||||
('data', '- '), ('starttag', 'a', [('href', '/rabota/')]),
|
||||
('starttag', 'span', [('class', 'en')]), ('data', ' software-and-i'),
|
||||
('endtag', 'span'), ('endtag', 'a'),
|
||||
('data', '- '), ('starttag', 'a', [('href', '/1/')]),
|
||||
('starttag', 'span', [('class', 'en')]), ('data', ' library'),
|
||||
('endtag', 'span'), ('endtag', 'a'), ('endtag', 'table')
|
||||
]
|
||||
|
||||
self._run_check(html, expected, collector=self.collector)
|
||||
|
||||
def test_comma_between_attributes(self):
|
||||
self._run_check('<form action="/xxx.php?a=1&b=2&", '
|
||||
'method="post">', [
|
||||
|
|
Loading…
Reference in New Issue