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
Rhodri James
9edf18d4ef
Add test to ensure a hash collision while expanding hash table
...
This is purely an exercise in code coverage; there is no user-level
way of telling that the hash table has been expanded or that a
collision occurred.
2017-07-22 22:49:14 +02:00
Rhodri James
440df48dc3
Test suspending parse during epilog
2017-07-22 22:49:13 +02:00
Rhodri James
9528e62a1e
Test aborting in the epilog not from a CR character
2017-07-22 22:49:13 +02:00
Rhodri James
ecfd3f15ad
Test handling of partial characters at the end of the epilog
2017-07-22 22:49:13 +02:00
Rhodri James
4bec1abfd4
Test incomplete token in epilog
2017-07-22 22:49:13 +02:00
Rhodri James
1cab6d80f5
Test comment in epilog with failing allocator
2017-07-22 21:57:20 +02:00
Rhodri James
208d652559
Test PI handling in epilog with a failing allocator
2017-07-22 21:57:20 +02:00
Rhodri James
8a8c871723
Extend abort test to cover more epilog code
2017-07-22 21:57:20 +02:00
Rhodri James
eefb733dc7
Test aborting parse during epilog processing
2017-07-22 21:57:20 +02:00
Rhodri James
e8d8c84e3e
Test suspending parse during an XML declaration
2017-07-22 21:57:20 +02:00
Rhodri James
6b2ead89fb
Shuffle code to keep similar things together.
...
No functional changes
2017-07-22 21:56:11 +02:00
Rhodri James
b690ac32c1
Test group with many elements and a failing reallocator
2017-07-22 21:52:47 +02:00
Rhodri James
46c39a18c1
Test deeply nested group parsing with a failing allocator
2017-07-22 21:52:47 +02:00
Rhodri James
1ca9975b91
Add test for external parameter entity with "not standalone" handler
2017-07-22 21:52:47 +02:00
Rhodri James
6e63cc24bd
Test external param entity with no further external parser
2017-07-22 21:52:47 +02:00
Rhodri James
79d190acef
Test undefined system parameter entity in external DTD
2017-07-22 21:52:46 +02:00
Rhodri James
b76c65d111
Test recursive parameter entity is rejected
2017-07-22 21:52:46 +02:00
Rhodri James
80552b5c60
Test skipped parameter entity in external DTD triggers handler
2017-07-22 21:52:46 +02:00
Rhodri James
ff15a49746
Review 2017-03-13: refactor XML_Expat_Version test
...
Also revised to allow for the different definitions of XML_LChar.
Previous versions will not have worked in XML_UNICODE builds.
2017-07-22 21:52:16 +02:00
Rhodri James
78a68b76e3
Review 2017-03-13: construct test string to avoid magic numbers
2017-07-22 21:50:58 +02:00
Rhodri James
d697e27038
Review 2017-03-13: replace magic number with appropriate string len
2017-07-22 21:50:57 +02:00
Rhodri James
be42a4ae1f
Remove warning about potentially unset variable in tests
...
Also make test function external_entity_public() more robust
against misuse.
2017-07-22 21:48:17 +02:00
Rhodri James
1d086b2915
Test standalone parameter entity coverage
2017-07-22 21:46:17 +02:00