Rhodri James
a40d23df08
Move external_entity_optioner up to be more generally available
...
No functionality changes in this commit
2017-07-22 22:49:16 +02:00
Rhodri James
eb99fe2529
Test long entity value and external entity with duff allocator
2017-07-22 22:49:16 +02:00
Rhodri James
fcae5d20aa
Test external entity with long public ID and failing allocator
2017-07-22 22:49:16 +02:00
Rhodri James
1ce3d9049a
Test long base URI for external parser with duff allocator
2017-07-22 22:49:16 +02:00
Rhodri James
75d3141f31
Test long entity system ID in external parser with failing allocator
2017-07-22 22:49:15 +02:00
Rhodri James
b03edfd961
Test with long default attribute for ext parser with duff allocator
2017-07-22 22:49:15 +02:00
Rhodri James
ec167d305c
Test longer context URI with a failing reallocator
2017-07-22 22:49:15 +02:00
Rhodri James
6aecdba977
Test a long URI in the context string with a failing allocator
2017-07-22 22:49:15 +02:00
Rhodri James
4282072d9c
Test long namespace in external entity context with duff reallocator
2017-07-22 22:49:15 +02:00
Rhodri James
4fe873c62b
Test long general entity name in external DTD with failing realloc
2017-07-22 22:49:15 +02:00
Rhodri James
126c0e8459
Test shorter long context URI with a failing reallocator
...
One last code path to exercise
2017-07-22 22:49:15 +02:00
Rhodri James
2950c7ac09
Again test long context URI against a failing reallocator
...
Another different code path
2017-07-22 22:49:15 +02:00
Rhodri James
67f238b794
Refactor context URI reallocation tests
2017-07-22 22:49:15 +02:00
Rhodri James
ae9fe3c614
Test shorter context URI in the face of a failing reallocator
...
Yet another different code path exercised
2017-07-22 22:49:15 +02:00
Rhodri James
1136aceaa3
Test different length context URI with duff reallocator
...
Exercises another different code path
2017-07-22 22:49:15 +02:00
Rhodri James
f4e09d7d5d
Test slightly shorter context URI with duff allocator
...
Exercises a different code path to previous context test
2017-07-22 22:49:15 +02:00
Rhodri James
464aefaccc
Test appropriately long context URI with a failing reallocator
2017-07-22 22:49:15 +02:00
Rhodri James
90f5d5e833
Test not-so-long namespace with failing allocator
2017-07-22 22:49:15 +02:00
Rhodri James
ddd6a15043
Test long namespace with failing allocator
2017-07-22 22:49:15 +02:00
Rhodri James
02a9d765d6
Test long root element name with a failing allocator
2017-07-22 22:49:15 +02:00
Rhodri James
96afb81e9a
Test longer namespace prefix with failing reallocator
2017-07-22 22:49:15 +02:00
Rhodri James
a5e1e0b94b
Test long namespace prefix with a failing reallocator
2017-07-22 22:49:15 +02:00
Rhodri James
e64102e71e
Test handling long attribute list with a failing reallocator
2017-07-22 22:49:15 +02:00
Rhodri James
aa04847906
Test that comments reach the default handler
2017-07-22 22:49:15 +02:00
Rhodri James
a7b6aea376
Test processing instruction with long body and duff allocator
2017-07-22 22:49:15 +02:00
Rhodri James
0a3a399d45
Test processing instruction reaches default handler if no PI handler
2017-07-22 22:49:15 +02:00
Rhodri James
5e4a2d6e6c
Test char entity extending param entity with failing reallocator
2017-07-22 22:49:14 +02:00
Rhodri James
afe4ad3830
Silence overly-pessimistic compiler warning.
...
The parsed_version structure will be fully filled in if parse_version
returns a non-zero value, but initializing the variable to zero is a
trivial cost for the tests.
2017-07-22 22:49:14 +02:00
Rhodri James
5d75b0ae62
Test invalid character reference is faulted
2017-07-22 22:49:14 +02:00
Rhodri James
4792f7af1c
Test expanding a param entity's string pool with a failing allocator
2017-07-22 22:49:14 +02:00
Rhodri James
87967e3623
Test trailing CR in a PE value is interpreted as a newline
2017-07-22 22:49:14 +02:00
Rhodri James
065ade6080
Test error in nested external entity substitution
2017-07-22 22:49:14 +02:00
Rhodri James
cb4f7250ac
Test another different code path for skipped external entity
2017-07-22 22:49:14 +02:00
Rhodri James
49a38e6291
Test different code path for skipping missing external entity
2017-07-22 22:49:14 +02:00
Rhodri James
09aef7e7e3
Test recursive parameter entity
2017-07-22 22:49:14 +02:00
Rhodri James
b641ecffa1
Test missing external entity is skipped
2017-07-22 22:49:14 +02:00
Rhodri James
74a7cdc0ae
Test general entity substitution in standalone internal param entity
2017-07-22 22:49:14 +02:00
Rhodri James
2ad7887d85
Test attribute value of a predefined entity with a duff allocator
2017-07-22 22:49:14 +02:00
Rhodri James
ee46bf0b44
Test whitespace attribute value with dodgy allocator
2017-07-22 22:49:14 +02:00
Rhodri James
a84705afc2
Test attribute value with trailing CR
2017-07-22 22:49:14 +02:00
Rhodri James
52e0daa410
Test long attribute value with failing allocator
2017-07-22 22:49:14 +02:00
Rhodri James
18106f4d58
Test long attribute value with character ref and a failing allocator
...
Tests strictly that a character reference at the end of a long default
value for an attribute will trigger the relevant string pool to grow,
and will recover correctly if there is no memory for growth
2017-07-22 22:49:14 +02:00
Rhodri James
8b5902c886
Test incomplete param ref in attribute default is rejected
2017-07-22 22:49:14 +02:00
Rhodri James
667d9cab63
Test invalid character in default attribute is rejected
2017-07-22 22:49:14 +02:00
Rhodri James
02dfd4b377
Test long attribute with a dodgy reallocator
...
This tests a specific code path through parameter substitution, and
requires the attribute value to come out to 1024 bytes PLUS a terminal
NUL to trigger growth of the string pool in use. The NUL is added
separately, and it is that string append that we are triggering on.
2017-07-22 22:49:14 +02:00
Rhodri James
bf27884912
Test restarting an errored parser returns the same error
2017-07-22 22:49:14 +02:00
Rhodri James
4b9056ae17
Check that resumed general entity parse can be re-suspended
2017-07-22 22:49:14 +02:00
Rhodri James
aae811152f
Test resuming a general entity catches XML errors
2017-07-22 22:49:14 +02:00
Rhodri James
28e9820bcd
Test suspending and resuming parse in parameter entity substitution
2017-07-22 22:49:14 +02:00
Rhodri James
f9c01d3bae
Test suspending and resuming parse during entity substitution
2017-07-22 22:49:14 +02:00