Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
18b0e5b7
Commit
18b0e5b7
authored
Nov 01, 2011
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#12008: add a test.
parent
7de56f6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
Lib/test/test_htmlparser.py
Lib/test/test_htmlparser.py
+24
-0
No files found.
Lib/test/test_htmlparser.py
View file @
18b0e5b7
...
...
@@ -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">'
,
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment