Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Use normal XML_Parse in test_suspend_resume_internal_entity
When the parser is suspended, _XML_Parse_SINGLE_BYTES() will return early. At that point, there could be some amount of bytes that haven't been fed into Expat at all yet. This leaves us with an incomplete document. Furthermore, the last internal XML_Parse() call with isFinal=XML_TRUE will not have happened, so the parser will not know that no more input is to be expected. This is what allowed the test to pass when it was originally changed to use SINGLE_BYTES. With the new partial token heuristic, the lack of a final parse call means that we don't even reach the "Ho" text, and fail the test. The simplest solution is to go back to using XML_Parse() in this test. Another option would be to let SINGLE_BYTES expose how far it got in its loop, allowing for later continuation, but it doesn't seem worth the extra complexity.
- Loading branch information