Commit Graph

332 Commits

Author SHA1 Message Date
Rhodri James
d9fce70b6f Test reallocation of attribute list with failing reallocator 2017-07-16 23:02:30 +02:00
Rhodri James
e24cf7a9cf Tweak test_alloc_external_entity to improve code coverage 2017-07-16 23:02:30 +02:00
Rhodri James
0153af32fb Extend skip handler test coverage 2017-07-16 23:02:30 +02:00
Rhodri James
ce81d26087 Test features are appropriately set 2017-07-16 23:02:30 +02:00
Rhodri James
2393c3fe26 Test predefined entities 2017-07-16 23:02:30 +02:00
Rhodri James
ec93648563 Make final reallocation test safe 2017-07-16 23:02:30 +02:00
Rhodri James
deeb8f2aae Test robustness against failing reallocator for parsing long names 2017-07-16 23:02:30 +02:00
Rhodri James
fe4f238660 Refactor long test data string 2017-07-16 23:02:30 +02:00
Rhodri James
c87613c958 Extend XML_GetBuffer testing coverage 2017-07-16 23:02:30 +02:00
Rhodri James
991693f12b Fix message in XML declaration handler 2017-07-16 23:02:30 +02:00
Rhodri James
ab53439060 Ensure unparsed entity handler gets set
Revise dummy handlers to flag when they are executed, and ensure
that they are executed in the test.  Add XML to get the deprecated
unparsed entity handler executed, and ensure that the allocation
check fails each possible allocator in sequence despite the
caching of some allocations in the parser object.

NOTE that this commit does not pass check because of an allocation
bug.
2017-07-16 23:02:30 +02:00
Rhodri James
85ed69eaf9 Split combined triplet_count into two distinct flags 2017-07-16 23:02:30 +02:00
Sebastian Pipping
26175e6a44 Revert "Fix structure initialisation not to cause warnings"
This reverts commit 894033fab8.
2017-07-16 23:02:30 +02:00
Sebastian Pipping
317a023df2 runtests.c: Fix memleaks 2017-07-16 19:07:50 +02:00
Rhodri James
23e64e1fbc Increase test coverage of ignore section processing 2017-07-16 19:05:03 +02:00
Rhodri James
6cacca3987 Refactor previous test to use existing test functions 2017-07-16 19:04:55 +02:00
Rhodri James
7a3664ab29 Test a broken IGNORE section is faulted 2017-07-16 19:04:44 +02:00
Rhodri James
da0bac99ad Exercise conditional exclusion code 2017-07-16 19:04:13 +02:00
Rhodri James
7495f28469 Test suspending the parse in the middle of CDATA handling 2017-07-16 19:02:26 +02:00
Rhodri James
23c488c8fd Test aborting parse while processing CDATA 2017-07-16 19:02:21 +02:00
Rhodri James
1a8297c54c Test a variety of incomplete UTF-16 CDATA strings 2017-07-16 19:02:14 +02:00
Rhodri James
9ac26205bc Test handling of UTF-16 supplementary plane characters 2017-07-16 19:01:54 +02:00
Rhodri James
e932825e22 Test long UTF-16 CDATA (more than internal buffer size) 2017-07-16 19:01:38 +02:00
Rhodri James
fa37a8069a Test CDATA correctly runs through a default handler
In particular exercises a code path dealing with newlines
2017-07-16 19:01:20 +02:00
Rhodri James
b86bec407b Test handling of CDATA in an external entity parser 2017-07-16 19:01:14 +02:00
Rhodri James
47003df13d Test reallocation of URI in re-used binding with dodgy reallocator 2017-07-16 19:00:57 +02:00
Rhodri James
757ac4cb0e Test w3.org xmlns URL is correctly rejected 2017-07-16 19:00:44 +02:00
Rhodri James
c7d2fc3020 Test rejection of invalid attribute 'xml' and use of w3.org 2017-07-16 19:00:36 +02:00
Rhodri James
a2302df9b6 Test for correct rejection of 'xmlns' as an attribute 2017-07-16 19:00:30 +02:00
Rhodri James
1ead467e3c Test extension of URI buffer shared between element tags 2017-07-16 19:00:24 +02:00
Rhodri James
d8651ffbe8 Test medium-length element name with namespaces and a failing allocator 2017-07-16 19:00:18 +02:00
Rhodri James
ea6ab8be03 Test mixed prefixed and unprefixed attributes in a namespace 2017-07-16 18:59:49 +02:00
Rhodri James
cbfc54ee2f Test allocator handling of attribute with long namespace 2017-07-16 18:59:34 +02:00
Sebastian Pipping
8eda8b3c9e runtests.c: Fix memleaks 2017-07-16 18:58:21 +02:00
Rhodri James
1c0ecf1b95 Test attribute table hash collision handling 2017-07-16 18:56:24 +02:00
Rhodri James
d526cd09f7 Test long attribute names in a namespace with failing allocator 2017-07-16 18:56:24 +02:00
Rhodri James
ade4c402af Extend test coverage of external entity handler parameters 2017-07-16 18:56:24 +02:00
Rhodri James
d69a504a5a Comment change: explain why attribute count is twice what you expect 2017-07-16 18:56:23 +02:00
Rhodri James
b1bea33582 Check NULLing the encoding works before the parse is started 2017-07-16 18:56:23 +02:00
Rhodri James
1056c797dd Test for specific error from XML_UseForeignDTD() 2017-07-16 18:56:23 +02:00
Rhodri James
894033fab8 Fix structure initialisation not to cause warnings 2017-07-16 18:56:23 +02:00
Rhodri James
53e1698aa3 Add test case for long URIs in attributes with failing allocator 2017-07-16 18:56:23 +02:00
Rhodri James
41ab4fd94a Test reallocation failure in xmlns attribute handling
Note that this commit provokes a segfault due to a bug in
storeAtts()
2017-07-16 18:56:23 +02:00
Rhodri James
f748d87811 Test rejection of unbound prefix, improve coverage of attribute handling 2017-07-16 18:56:23 +02:00
Rhodri James
edfcd16b98 Test long namespace names (1024 characters) 2017-07-16 18:56:23 +02:00
Rhodri James
8dabab1576 Refactor namespace allocation tests 2017-07-16 18:56:23 +02:00
Rhodri James
20c12da662 Extend code path coverage of entity handling 2017-07-16 18:56:23 +02:00
Rhodri James
f591474e62 Add test coverage for comments with a failing allocator 2017-07-16 18:43:34 +02:00
Rhodri James
8f3d13188b More coverage of PIs with failing allocator 2017-07-16 18:43:18 +02:00
Rhodri James
a1cffcb4ea Test parsing a PI with a failing allocator 2017-07-16 18:42:33 +02:00
Rhodri James
97ad97e9e9 Expand really long line test for encoded CDATA handling 2017-07-16 18:42:23 +02:00
Rhodri James
ef26a78837 Test right square bracket handling in external entity parses 2017-07-16 18:41:49 +02:00
Rhodri James
a3a68a412d More tests for the right square bracket control paths 2017-07-16 18:41:33 +02:00
Rhodri James
8bdf2bc102 Test handling of right square bracket at end of content data 2017-07-16 18:41:23 +02:00
Rhodri James
fe2e255025 Extend ASCII CDATA test to cover a default handler 2017-07-16 18:41:08 +02:00
Rhodri James
213c8523a3 Add CDATA section handlers for increased test coverage 2017-07-16 18:41:03 +02:00
Rhodri James
05fe0bd6c9 Add default handler to namespace failing allocation test
Increases code coverage.  Also tweaked allocation counts for
better coverage
2017-07-16 18:40:52 +02:00
Rhodri James
e92f989efe Add default handlers to character entity tests to extend coverage 2017-07-16 18:40:41 +02:00
Rhodri James
dabb530d17 Extend coverage of namespace start and end handlers 2017-07-16 18:40:33 +02:00
Rhodri James
41524fed85 Test external entity with no handler 2017-07-16 18:40:05 +02:00
Rhodri James
9a7d8d2c3f Tweak tests for greater allocation failure coverage 2017-07-16 18:39:56 +02:00
Rhodri James
7653beecee More external entity allocation failure coverage 2017-07-16 18:39:42 +02:00
Rhodri James
f71790ccf9 Extend coverage of partial character parsing 2017-07-16 18:37:31 +02:00
Rhodri James
6cfef69705 Test trailing CR in external entity parse 2017-07-16 18:37:17 +02:00
Rhodri James
15ef260f6b Test handling of trailing CR (rather than newline) 2017-07-16 18:37:00 +02:00
Sebastian Pipping
b24ecb9d46 runtests.c: Fix memleaks 2017-07-16 18:27:00 +02:00
Rhodri James
df0138ac3f Extend test coverage of external entity suspension 2017-07-16 18:23:44 +02:00
Rhodri James
80394e1792 Test suspending from an external entity's XML declaration handler 2017-07-16 18:23:20 +02:00
Sebastian Pipping
5c07211b84 runtests.c: Fix memory leaks 2017-07-16 02:09:23 +02:00
Sebastian Pipping
738162b60c runtests.c: Polish test_ext_entity_invalid_parse 2017-07-16 02:06:29 +02:00
Rhodri James
7b9b40bcee Refactor and extend external entity parse error testing 2017-07-16 02:01:30 +02:00
Rhodri James
6381273b8b Check parse errors in external entity parsers 2017-07-16 01:59:28 +02:00
Rhodri James
24e16ecbd8 Test UTF-8 BOM is recognised in UTF-8 external entity 2017-07-16 01:58:07 +02:00
Rhodri James
ab53e5da3f Test unknown encoding in external entity parser (increase coverage) 2017-07-16 01:55:23 +02:00
Rhodri James
0f403d1d5d Check handling of long element names with namespaces 2017-07-16 01:52:59 +02:00
Rhodri James
da93b3992a Refactor allocator test support 2017-07-16 01:44:33 +02:00
Sebastian Pipping
483803255d minicheck.c: Protect against potential NULL dereference 2017-07-15 19:14:49 +02:00
Sebastian Pipping
7c82b0b4ab minicheck.c: Rename *_dispose to *_free 2017-07-15 19:07:30 +02:00
Rhodri James
c5b129e597 Free the external entity parser in external_entity_loader_set_encoding()
Removes the last of the memory leaks detected by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:55:51 +01:00
Rhodri James
e4bfe3c7d1 Free all the data structures associated with test cases.
Removes some of the memory leaks discovered by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:53:56 +01:00
Rhodri James
38c1ce7cd5 Free the content model in dummy_element_decl_handler()
Removes some of the memory leaks found by AddressSanitizer in
the test suite (see Issue #23)
2017-07-14 17:33:59 +01:00
Rhodri James
d350a6cb0d Free external entity parser in external_entity_param()
Removes some of the memory leaks detected by AddressSanitizer in
the test suite (see Issue #23).
2017-07-14 17:22:54 +01:00
Rhodri James
8cdcb7219d Free external entity parser in external_entity_suspender()
Removes some memory leaks detected by AddressSanitizer in
the test suite (see Issue #23)
2017-07-14 17:15:12 +01:00
Rhodri James
448cd2acac Free external entity parser in external_entity_param_checker()
Removes some of the memory leaks detected by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:13:22 +01:00
Rhodri James
a7db7a1c1a Free external entity parser in external_entity_resetter() when done
Deals with some of the memory leaks found by AddressSanitizer in
the test suite (Issue #23)
2017-07-14 17:03:25 +01:00
Rhodri James
d3b3f7fa48 Free external entity parser in external_entity_loader() when done.
Removes some memory leaks detected by AddressSanitizer in the
test suite (see Issue #23)
2017-07-14 17:02:34 +01:00
Rhodri James
18be28458b Use correct parser to signal failure in external_entity_loader() 2017-07-14 16:49:50 +01:00
Sebastian Pipping
b5aaa782fa runtests.c: Protect against -DNDEBUG (issue #76 related) 2017-07-12 20:16:37 +02:00
Sebastian Pipping
5f51145401 Move to C99 (#73) and fix ULL integer literals (#69) 2017-07-12 18:47:37 +02:00
Sebastian Pipping
e4f71eeaa0 tests: Address -Wformat compile warnings 2017-06-26 00:31:29 +02:00
Karl Waclawek
85718691e5 Windows release: Update README, remove VC++ 6.0 files from installer, fix runtests.vcxproj file. 2017-06-17 12:05:48 -04:00
Sebastian Pipping
1ee8601f24 Merge branch 'siphash' 2017-06-17 01:04:09 +02:00
Rhodri James
774ee6c15b Tests: Cover external entity infinite loop bug 2017-06-17 01:00:05 +02:00
Sebastian Pipping
3fb1ec4334 Make "make run-xmltest" work for MinGW cross-compilation 2017-06-14 22:36:51 +02:00
Sebastian Pipping
a68c125fba tests/runtests.c: Address byte_character_handler unused variables 2017-06-13 23:38:01 +02:00
Sebastian Pipping
efa3749d8f siphash: Test implementation 2017-06-11 01:20:41 +02:00
Sebastian Pipping
4f862dddf9 examples|tests|xmlwf: Drop AmigaOS 4.x include (issue #14) 2017-06-07 20:31:15 +02:00
Sebastian Pipping
f0b63f56c8 Address warning "initializer element is not computable at load time" 2017-05-28 15:02:19 +02:00
Sebastian Pipping
50e0dd88f0 Visual Studio 20xx: No longer define WIN32 2017-05-25 15:25:18 +02:00
Rhodri James
643a09d42d Fix misuse of realloc in tcase_add_test() 2017-05-24 19:08:54 +02:00