mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add test for parsing of comments containing dashes
This commit is contained in:
parent
3c6bfed2c4
commit
6a186122c3
@ -143,8 +143,13 @@ def attribute_replacement(test, parse_function):
|
||||
err = 'SVG attributes not normalized, parsed markup:\n' + etree.tostring(root)
|
||||
test.assertEqual(len(XPath('//svg:svg[@viewBox]')(root)), 2, err)
|
||||
|
||||
def comments(test, parse_function):
|
||||
markup = '<html><!-- -- ---><body/></html>'
|
||||
root = parse_function(markup)
|
||||
test.assertEqual(len(XPath('//h:body')(root)), 1, 'Failed to parse with comment containing dashes')
|
||||
|
||||
basic_checks = (nonvoid_cdata_elements, namespaces, space_characters,
|
||||
case_insensitive_element_names, entities,
|
||||
case_insensitive_element_names, entities, comments,
|
||||
multiple_html_and_body, attribute_replacement)
|
||||
|
||||
class ParsingTests(BaseTest):
|
||||
|
Loading…
x
Reference in New Issue
Block a user