Commit Graph

1929 Commits

Author SHA1 Message Date
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
Rhodri James
1adb2438d0 Test substituted public entity with long name against failing realloc 2017-07-22 21:46:17 +02:00
Rhodri James
3c526f6d6c Test group with choice in element declaration 2017-07-22 21:46:17 +02:00
Rhodri James
da5c188913 Add element decl handler to nested group reallocation test 2017-07-22 21:46:17 +02:00
Rhodri James
260a7644d7 Add element declaration handler to nested group test 2017-07-22 21:46:17 +02:00
Rhodri James
1bb33c7027 Test nested groups with a failing reallocator 2017-07-22 21:46:16 +02:00
Rhodri James
507c2e5c9b Test deeply-nested groups 2017-07-22 21:46:16 +02:00
Rhodri James
383e762f8c Test public notation with no system ID 2017-07-22 21:46:16 +02:00
Rhodri James
d4bc5da92b Test system notation with failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James
6ae8e2777e Test public notation with long system ID against failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James
1044af1f31 Extend notation allocation test with notation declaration handler
This extends the code coverage a little, in particular checking
another allocation failure path.
2017-07-22 21:46:16 +02:00
Rhodri James
5a1f46a87d Extend PE allocation test with long entity name 2017-07-22 21:46:16 +02:00