mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Add test cases for bug 758518
test/HTML/758518-entity.html exposed a bug in pushParseTest() in runtest.c which assumed that an input file was at least 4 bytes long. That test case is only 3 bytes, so we now take the minimum of 4 bytes or the length of the test input. We also now use 'chunkSize' in place of the hard-coded value '1024' later in the function.
This commit is contained in:
committed by
Nick Wellnhofer
parent
ed48d65b4d
commit
85c112a082
2
result/HTML/758518-entity.html
Normal file
2
result/HTML/758518-entity.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body><p>&Ù</p></body></html>
|
||||
3
result/HTML/758518-entity.html.err
Normal file
3
result/HTML/758518-entity.html.err
Normal file
@@ -0,0 +1,3 @@
|
||||
./test/HTML/758518-entity.html:1: HTML parser error : htmlParseEntityRef: expecting ';'
|
||||
Ù
|
||||
^
|
||||
12
result/HTML/758518-entity.html.sax
Normal file
12
result/HTML/758518-entity.html.sax
Normal file
@@ -0,0 +1,12 @@
|
||||
SAX.setDocumentLocator()
|
||||
SAX.startDocument()
|
||||
SAX.error: htmlParseEntityRef: expecting ';'
|
||||
SAX.startElement(html)
|
||||
SAX.startElement(body)
|
||||
SAX.startElement(p)
|
||||
SAX.characters(&, 1)
|
||||
SAX.characters(Ù, 2)
|
||||
SAX.endElement(p)
|
||||
SAX.endElement(body)
|
||||
SAX.endElement(html)
|
||||
SAX.endDocument()
|
||||
2
result/HTML/758518-tag.html
Normal file
2
result/HTML/758518-tag.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html><body><p>“</p></body></html>
|
||||
3
result/HTML/758518-tag.html.err
Normal file
3
result/HTML/758518-tag.html.err
Normal file
@@ -0,0 +1,3 @@
|
||||
./test/HTML/758518-tag.html:1: HTML parser error : PI is not started correctly
|
||||
|
||||
^
|
||||
10
result/HTML/758518-tag.html.sax
Normal file
10
result/HTML/758518-tag.html.sax
Normal file
@@ -0,0 +1,10 @@
|
||||
SAX.setDocumentLocator()
|
||||
SAX.startDocument()
|
||||
SAX.error: PI is not started correctlySAX.startElement(html)
|
||||
SAX.startElement(body)
|
||||
SAX.startElement(p)
|
||||
SAX.characters(“, 2)
|
||||
SAX.endElement(p)
|
||||
SAX.endElement(body)
|
||||
SAX.endElement(html)
|
||||
SAX.endDocument()
|
||||
Reference in New Issue
Block a user