#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <stdint.h>
#include <stddef.h> /* ptrdiff_t */
#include <ctype.h>
#include <limits.h>
+
+#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600)
+ /* For vs2003/7.1 up to vs2008/9.0; _MSC_VER 1600 is vs2010/10.0 */
+ #if defined(_WIN64)
+ typedef __int64 intptr_t;
+ #else
+ typedef __int32 intptr_t;
+ #endif
+ typedef unsigned __int64 uint64_t;
+#else
+ #include <stdint.h> /* intptr_t uint64_t */
+#endif
+
+
#if ! defined(__cplusplus)
# if defined(_MSC_VER) && (_MSC_VER <= 1700)
/* for vs2012/11.0/1700 and earlier Visual Studio compilers */
_expect_failure(const char *text, enum XML_Error errorCode, const char *errorMessage,
const char *file, int lineno)
{
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_OK)
/* Hackish use of _fail_unless() macro, but let's us report
the right filename and line number. */
_fail_unless(0, file, lineno, errorMessage);
if (ext_parser == NULL)
return XML_STATUS_ERROR;
rc = _XML_Parse_SINGLE_BYTES(ext_parser, options->parse_text,
- strlen(options->parse_text),
+ (int)strlen(options->parse_text),
XML_TRUE);
XML_ParserFree(ext_parser);
return rc;
const uint64_t expected = _SIP_ULL(0xa129ca61U, 0x49be45e5U);
struct siphash state;
struct sipkey key;
- (void)sip_tobin;
sip_tokey(&key,
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09"
/* This test is really just making sure we don't core on a UTF-8 BOM. */
const char *text = "\357\273\277<e/>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetCharacterDataHandler(parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
_xml_failure(parser, file, line);
CharData_CheckXMLChars(&storage, expected);
}
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetStartElementHandler(parser, accumulate_attribute);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
_xml_failure(parser, file, line);
CharData_CheckXMLChars(&storage, expected);
}
test_data->storage = &storage;
XML_SetUserData(parser, test_data);
XML_SetCharacterDataHandler(parser, ext_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
_xml_failure(parser, file, line);
CharData_CheckXMLChars(&storage, expected);
for (i = 128; i <= 255; ++i) {
sprintf(text, "<e>%ccd</e>", i);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) {
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_OK) {
sprintf(text,
"expected token error for '%c' (ordinal %d) in UTF-8 text",
i, i);
"\n</tag>";
XML_Size lineno;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
lineno = XML_GetCurrentLineNumber(parser);
if (lineno != 4) {
const char *text = "<tag></tag>";
XML_Size colno;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
colno = XML_GetCurrentColumnNumber(parser);
if (colno != 11) {
XML_SetUserData(parser, &storage);
XML_SetStartElementHandler(parser, start_element_event_handler2);
XML_SetEndElementHandler(parser, end_element_event_handler2);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
StructData_CheckItems(&storage, expected, expected_count);
" <b>\n"
" </a>"; /* missing </b> */
XML_Size lineno;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) != XML_STATUS_ERROR)
fail("Expected a parse error");
lineno = XML_GetCurrentLineNumber(parser);
" <b>\n"
" </a>"; /* missing </b> */
XML_Size colno;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) != XML_STATUS_ERROR)
fail("Expected a parse error");
colno = XML_GetCurrentColumnNumber(parser);
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+"
"</e>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+"
"</e>";
- int parse_len = strlen(text);
+ int parse_len = (int)strlen(text);
/* Need a cdata handler to provoke the code path we want to test */
XML_SetCharacterDataHandler(parser, dummy_cdata_handler);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetEndElementHandler(parser, end_element_event_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
}
XML_SetStartElementHandler(parser,
check_attr_contains_normalized_whitespace);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
"<test a='&foo;'/>";
XML_SetUnknownEncodingHandler(parser, UnknownEncodingHandler, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
XML_SetUnknownEncodingHandler(parser,
UnrecognisedEncodingHandler,
NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
fail("Unrecognised encoding not rejected");
}
END_TEST
}
if ( _XML_Parse_SINGLE_BYTES(extparser,
test_data->parse_text,
- strlen(test_data->parse_text),
+ (int)strlen(test_data->parse_text),
XML_TRUE)
== XML_STATUS_ERROR) {
xml_failure(extparser);
}
if (_XML_Parse_SINGLE_BYTES(ext_parser,
fault->parse_text,
- strlen(fault->parse_text),
+ (int)strlen(fault->parse_text),
XML_TRUE) != XML_STATUS_ERROR)
fail(fault->fail_text);
if (XML_GetErrorCode(ext_parser) != fault->error)
"<!DOCTYPE doc SYSTEM 'foo'>\n"
"<doc>&entity;</doc>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
for (test = attr_data; test->definition != NULL; test++) {
XML_SetAttlistDeclHandler(parser, verify_attlist_decl_handler);
XML_SetUserData(parser, test);
- if (_XML_Parse_SINGLE_BYTES(parser, prolog, strlen(prolog),
+ if (_XML_Parse_SINGLE_BYTES(parser, prolog, (int)strlen(prolog),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
if (_XML_Parse_SINGLE_BYTES(parser,
test->definition,
- strlen(test->definition),
+ (int)strlen(test->definition),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
XML_ParserReset(parser, NULL);
" <e xmlns:prefix=''/>\n"
"</doc>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
" ]>\n"
"<e:element/>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler);
resumable = XML_FALSE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
xml_failure(parser);
if (XML_GetErrorCode(parser) != XML_ERROR_ABORTED)
xml_failure(parser);
XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler);
resumable = XML_TRUE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_SUSPENDED)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_SUSPENDED)
xml_failure(parser);
if (XML_GetErrorCode(parser) != XML_ERROR_NONE)
xml_failure(parser);
/* Try parsing directly */
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
fail("Attempt to continue parse while suspended not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED)
fail("Suspended parse not faulted with correct error");
XML_SetCharacterDataHandler(parser, parser_stop_character_handler);
resumable = XML_FALSE;
abortable = XML_FALSE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
fail("Failed to double-stop parser");
XML_SetCharacterDataHandler(parser, parser_stop_character_handler);
resumable = XML_TRUE;
abortable = XML_FALSE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_SUSPENDED)
fail("Failed to double-suspend parser");
XML_SetCharacterDataHandler(parser, parser_stop_character_handler);
resumable = XML_TRUE;
abortable = XML_TRUE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
fail("Failed to suspend-abort parser");
}
XML_SetStartCdataSectionHandler(parser, dummy_start_cdata_handler);
XML_SetEndCdataSectionHandler(parser, dummy_end_cdata_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetCharacterDataHandler(parser, accumulate_characters);
XML_SetDefaultHandler(parser, dummy_default_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
}
XML_SetUserData(parser, &storage);
XML_SetCharacterDataHandler(parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
}
XML_SetUserData(parser, &storage);
XML_SetCharacterDataHandler(parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
}
XML_SetUserData(parser, &storage);
XML_SetCharacterDataHandler(parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
}
"\xdc\x00\xd8\x00"
"\0]\0]\0>\0<\0/\0a\0>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text) - 1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1,
XML_TRUE) != XML_STATUS_ERROR)
fail("Reversed UTF-16 surrogate pair not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN)
size_t i = 0;
for (; i < sizeof(cases) / sizeof(struct CaseData); i++) {
const enum XML_Status actualStatus = _XML_Parse_SINGLE_BYTES(
- parser, cases[i].text, strlen(cases[i].text), XML_TRUE);
+ parser, cases[i].text, (int)strlen(cases[i].text), XML_TRUE);
const enum XML_Error actualError = XML_GetErrorCode(parser);
assert(actualStatus == XML_STATUS_ERROR);
enum XML_Status actual_status;
enum XML_Error actual_error;
- if (_XML_Parse_SINGLE_BYTES(parser, prolog, sizeof(prolog)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, prolog, (int)sizeof(prolog)-1,
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
actual_status = _XML_Parse_SINGLE_BYTES(parser,
cases[i].text,
- cases[i].text_bytes,
+ (int)cases[i].text_bytes,
XML_TRUE);
assert(actual_status == XML_STATUS_ERROR);
actual_error = XML_GetErrorCode(parser);
XML_SetCharacterDataHandler(parser,
clearing_aborting_character_handler);
resumable = XML_TRUE;
- result = _XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE);
+ result = _XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE);
if (result != XML_STATUS_SUSPENDED) {
if (result == XML_STATUS_ERROR)
xml_failure(parser);
XML_SetCharacterDataHandler(parser, record_cdata_handler);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, XCS("DCDCDCDCDCDD"));
XML_SetCharacterDataHandler(parser, record_cdata_nodefault_handler);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, XCS("DcccccD"));
XML_SetCharacterDataHandler(parser, record_cdata_handler);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, entity_text, strlen(entity_text),
+ if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
/* The default handler suppresses the entity */
XML_SetSkippedEntityHandler(parser, record_skip_handler);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, entity_text, strlen(entity_text),
+ if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
/* The default handler suppresses the entity */
XML_SetCharacterDataHandler(parser, record_cdata_handler);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, entity_text, strlen(entity_text),
+ if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, XCS("DDDDDDDDDDDDDDDDDCDD"));
XML_SetCharacterDataHandler(parser, record_cdata_nodefault_handler);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, entity_text, strlen(entity_text),
+ if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, XCS("DDDDDDDDDDDDDDDDDcD"));
"<doc><chapter>Wombats are go</chapter></doc>";
XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetDefaultHandler(parser, dummy_default_handler);
if (XML_UseForeignDTD(parser, XML_TRUE) != XML_ERROR_NONE)
fail("Could not set foreign DTD");
- if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
fail("Failed to reject late hash salt change");
/* Now finish the parse */
- if (_XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetDefaultHandler(parser, dummy_default_handler);
if (XML_UseForeignDTD(parser, XML_TRUE) != XML_ERROR_NONE)
fail("Could not set foreign DTD");
- if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
fail("Failed to reject late hash salt change");
/* Now finish the parse */
- if (_XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetUserData(parser, NULL);
XML_SetExternalEntityRefHandler(parser, external_entity_null_loader);
XML_UseForeignDTD(parser, XML_TRUE);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetStartElementHandler(parser, counting_start_element_handler);
XML_SetUserData(parser, info);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
resumable = XML_TRUE;
XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
XML_GetParsingStatus(parser, &status);
if (status.parsing != XML_SUSPENDED)
resumable = XML_TRUE;
XML_SetCharacterDataHandler(parser,
clearing_aborting_character_handler);
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (XML_ResumeParser(parser) == XML_STATUS_OK)
fail("Resumed invalid parse not faulted");
resumable = XML_TRUE;
XML_SetCharacterDataHandler(parser,
clearing_aborting_character_handler);
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
resumable = XML_TRUE;
XML_SetCharacterDataHandler(parser,
XML_SetUserData(parser, &storage);
XML_SetDefaultHandler(parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
fail("Parsing status is not INITIALIZED");
return XML_STATUS_ERROR;
}
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR) {
xml_failure(parser);
return XML_STATUS_ERROR;
return XML_STATUS_ERROR;
}
/* Check we can't parse here */
- if (XML_Parse(ext_parser, text, strlen(text),
+ if (XML_Parse(ext_parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
fail("Parsing when finished not faulted");
if (XML_GetErrorCode(ext_parser) != XML_ERROR_FINISHED)
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_resetter);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
fail("Could not create external entity parser");
XML_SetElementDeclHandler(ext_parser, entity_suspending_decl_handler);
XML_SetUserData(ext_parser, ext_parser);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR) {
xml_failure(ext_parser);
return XML_STATUS_ERROR;
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_suspender);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
fail("Could not create external entity parser");
XML_SetXmlDeclHandler(ext_parser, entity_suspending_xdecl_handler);
XML_SetUserData(ext_parser, ext_parser);
- rc = _XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text), XML_TRUE);
+ rc = _XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text), XML_TRUE);
XML_GetParsingStatus(ext_parser, &status);
if (resumable) {
if (rc == XML_STATUS_ERROR)
XML_SetExternalEntityRefHandler(parser,
external_entity_suspend_xmldecl);
resumable = XML_TRUE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetExternalEntityRefHandler(parser,
external_entity_suspend_xmldecl);
resumable = XML_FALSE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_Parser ext_parser;
ExtFaults *fault = (ExtFaults *)XML_GetUserData(parser);
void *buffer;
- int parse_len = strlen(fault->parse_text);
+ int parse_len = (int)strlen(fault->parse_text);
ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
if (ext_parser == NULL)
/* Say we are UTF-8 */
if (XML_SetEncoding(parser, XCS("utf-8")) != XML_STATUS_OK)
fail("Failed to set explicit encoding");
- if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
/* Try to switch encodings mid-parse */
if (XML_SetEncoding(parser, XCS("us-ascii")) != XML_STATUS_ERROR)
fail("Allowed encoding change");
- if (_XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
/* Try now the parse is over */
XML_SetCharacterDataHandler(parser, cr_cdata_handler);
XML_SetUserData(parser, &found_cr);
found_cr = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_OK)
fail("Failed to fault unclosed doc");
if (found_cr == 0)
XML_SetDefaultHandler(parser, cr_cdata_handler);
XML_SetUserData(parser, &found_cr);
found_cr = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_OK)
fail("Failed to fault unclosed doc");
if (found_cr == 0)
if (ext_parser == NULL)
fail("Could not create external entity parser");
XML_SetCharacterDataHandler(ext_parser, cr_cdata_handler);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(ext_parser);
XML_ParserFree(ext_parser);
if (ext_parser == NULL)
fail("Could not create external entity parser");
XML_SetCharacterDataHandler(ext_parser, cr_cdata_handler);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_OK)
fail("Async entity error not caught");
if (XML_GetErrorCode(ext_parser) != XML_ERROR_ASYNC_ENTITY)
XML_SetExternalEntityRefHandler(parser, external_entity_cr_catcher);
XML_SetUserData(parser, &found_cr);
found_cr = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_OK)
xml_failure(parser);
if (found_cr == 0)
XML_SetExternalEntityRefHandler(parser, external_entity_bad_cr_catcher);
XML_SetUserData(parser, &found_cr);
found_cr = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_OK)
xml_failure(parser);
if (found_cr == 0)
const char *text8 = "<doc>]";
const char text16[] = "\xFF\xFE<\000d\000o\000c\000>\000]\000";
int found_rsqb;
- int text8_len = strlen(text8);
+ int text8_len = (int)strlen(text8);
XML_SetCharacterDataHandler(parser, rsqb_handler);
XML_SetUserData(parser, &found_rsqb);
XML_SetCharacterDataHandler(parser, rsqb_handler);
XML_SetUserData(parser, &found_rsqb);
found_rsqb = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text16, sizeof(text16)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text16, (int)sizeof(text16)-1,
XML_TRUE) == XML_STATUS_OK)
fail("Failed to fault unclosed doc");
if (found_rsqb == 0)
XML_SetDefaultHandler(parser, rsqb_handler);
XML_SetUserData(parser, &found_rsqb);
found_rsqb = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text16, sizeof(text16)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text16, (int)sizeof(text16)-1,
XML_TRUE) == XML_STATUS_OK)
fail("Failed to fault unclosed doc");
if (found_rsqb == 0)
if (ext_parser == NULL)
fail("Could not create external entity parser");
XML_SetCharacterDataHandler(ext_parser, rsqb_handler);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
fail("Async entity error not caught");
if (XML_GetErrorCode(ext_parser) != XML_ERROR_ASYNC_ENTITY)
XML_SetExternalEntityRefHandler(parser, external_entity_rsqb_catcher);
XML_SetUserData(parser, &found_rsqb);
found_rsqb = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_OK)
xml_failure(parser);
if (found_rsqb == 0)
XML_SetUserData(ext_parser, &storage);
XML_SetCharacterDataHandler(ext_parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(ext_parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser,
external_entity_good_cdata_ascii);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_OK)
xml_failure(parser);
}
if (ext_parser == NULL)
fail("Could not create external entity parser");
handler_data = ext_parser;
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR) {
xml_failure(parser);
return XML_STATUS_ERROR;
XML_UseParserAsHandlerArg(parser);
XML_SetUserData(parser, (void *)1);
handler_data = parser;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
if (comment_count != 2)
/* Ensure we can't change policy mid-parse */
if (XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_NEVER))
fail("Changed param entity parsing policy while parsing");
- if (_XML_Parse_SINGLE_BYTES(parser, epilog, strlen(epilog),
+ if (_XML_Parse_SINGLE_BYTES(parser, epilog, (int)strlen(epilog),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (comment_count != 3)
ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
if (ext_parser == NULL)
fail("Could not create external entity parser");
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(ext_parser);
*/
XML_SetExternalEntityRefHandlerArg(parser, (void *)text);
handler_data = (void *)text;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
external_entity_ref_param_checker);
XML_SetExternalEntityRefHandlerArg(parser, NULL);
handler_data = (void *)parser;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
/* Now try with valid text before the empty end */
XML_ParserReset(parser, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
if (XML_Parse(parser, NULL, 0, XML_TRUE) == XML_STATUS_ERROR)
/* Now try with invalid text before the empty end */
XML_ParserReset(parser, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, partial, strlen(partial),
+ if (_XML_Parse_SINGLE_BYTES(parser, partial, (int)strlen(partial),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
if (XML_Parse(parser, NULL, 0, XML_TRUE) != XML_STATUS_ERROR)
if (buffer == NULL)
fail("1.5K buffer failed");
memcpy(buffer, text, strlen(text));
- if (XML_ParseBuffer(parser, strlen(text), XML_FALSE) == XML_STATUS_ERROR)
+ if (XML_ParseBuffer(parser, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
if (XML_GetBuffer(parser, INT_MAX) != NULL)
fail("INT_MAX buffer not failed");
if (buffer == NULL)
fail("1.5K buffer failed");
memcpy(buffer, text, strlen(text));
- if (XML_ParseBuffer(parser, strlen(text), XML_FALSE) == XML_STATUS_ERROR)
+ if (XML_ParseBuffer(parser, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
/* Extend it, to catch a different code path */
if (XML_GetCurrentByteIndex(parser) != -1 ||
XML_GetCurrentByteCount(parser) != 0)
fail("Byte index/count incorrect at start of parse");
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
/* At end, the count will be zero and the index the end of string */
{
const char *text = PRE_ERROR_STR POST_ERROR_STR;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_OK)
fail("Syntax error not faulted");
if (XML_GetCurrentByteCount(parser) != 0)
if (XML_GetInputContext(parser, &offset, &size) != NULL)
fail("Unexpected context at start of parse");
- data.start_element_len = strlen(START_ELEMENT);
- data.cdata_len = strlen(CDATA_TEXT);
- data.total_string_len = strlen(text);
+ data.start_element_len = (int)strlen(START_ELEMENT);
+ data.cdata_len = (int)strlen(CDATA_TEXT);
+ data.total_string_len = (int)strlen(text);
XML_SetCharacterDataHandler(parser, byte_character_handler);
XML_SetUserData(parser, &data);
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_OK)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_OK)
xml_failure(parser);
}
END_TEST
*/
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
/* The default handler doesn't translate the entities */
fail("Could not create external entity parser");
if (!xcstrcmp(systemId, XCS("004-1.ent"))) {
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, (int)strlen(text1),
XML_TRUE) != XML_STATUS_ERROR)
fail("Inner DTD with invalid tag not rejected");
if (XML_GetErrorCode(ext_parser) != XML_ERROR_EXTERNAL_ENTITY_HANDLING)
xml_failure(ext_parser);
}
else if (!xcstrcmp(systemId, XCS("004-2.ent"))) {
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, (int)strlen(text2),
XML_TRUE) != XML_STATUS_ERROR)
fail("Invalid tag in external param not rejected");
if (XML_GetErrorCode(ext_parser) != XML_ERROR_SYNTAX)
ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
if (ext_parser == NULL)
fail("Could not create external entity parser");
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
XML_SetStartElementHandler(parser, dummy_start_element);
XML_SetEndElementHandler(parser, dummy_end_element);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
if (ext_parser == NULL)
fail("Could not create external entity parser");
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
XML_SetStartElementHandler(parser, dummy_start_element);
XML_SetEndElementHandler(parser, dummy_end_element);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
if (ext_parser == NULL)
fail("Could not create external entity parser");
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
XML_SetStartElementHandler(parser, dummy_start_element);
XML_SetEndElementHandler(parser, dummy_end_element);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
if (ext_parser == NULL)
fail("Could not create external entity parser");
if (!xcstrcmp(systemId, XCS("004-1.ent"))) {
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, (int)strlen(text1),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(ext_parser);
}
status = _XML_Parse_SINGLE_BYTES(ext_parser,
fault->parse_text,
- strlen(fault->parse_text),
+ (int)strlen(fault->parse_text),
XML_TRUE);
if (fault->error == XML_ERROR_NONE) {
if (status == XML_STATUS_ERROR)
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_valuer);
XML_SetUserData(parser, &data_004_2[i]);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
XML_ParserReset(parser, NULL);
if (!xcstrcmp(systemId, XCS("foo"))) {
XML_SetNotStandaloneHandler(ext_parser,
reject_not_standalone_handler);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, (int)strlen(text1),
XML_TRUE) != XML_STATUS_ERROR)
fail("Expected not standalone rejection");
if (XML_GetErrorCode(ext_parser) != XML_ERROR_NOT_STANDALONE)
return XML_STATUS_ERROR;
}
else if (!xcstrcmp(systemId, XCS("bar"))) {
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, (int)strlen(text2),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(ext_parser);
}
if (ext_parser == NULL)
fail("Could not create external entity parser");
if (!xcstrcmp(systemId, XCS("004-1.ent"))) {
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, (int)strlen(text1),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(ext_parser);
}
if (!xcstrcmp(systemId, XCS("004-2.ent"))) {
XML_SetXmlDeclHandler(ext_parser, entity_suspending_xdecl_handler);
XML_SetUserData(ext_parser, ext_parser);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, (int)strlen(text2),
XML_TRUE) != XML_STATUS_ERROR)
fail("Aborted parse not faulted");
if (XML_GetErrorCode(ext_parser) != XML_ERROR_ABORTED)
XML_SetExternalEntityRefHandler(parser,
external_entity_value_aborter);
resumable = XML_FALSE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (dummy_handler_flags != 0)
dummy_handler_flags = 0;
XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (dummy_handler_flags != DUMMY_NOTATION_DECL_HANDLER_FLAG)
const XML_Char *name,
const XML_Char **UNUSED_P(atts))
{
- CharData_AppendXMLChars((CharData *)userData, name, xcstrlen(name));
+ CharData_AppendXMLChars((CharData *)userData, name, (int)xcstrlen(name));
}
START_TEST(test_nested_groups)
XML_SetStartElementHandler(parser, record_element_start_handler);
XML_SetUserData(parser, &storage);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, XCS("doce"));
XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (dummy_handler_flags != DUMMY_ELEMENT_DECL_HANDLER_FLAG)
}
else
fail("Unexpected parameters to external entity parser");
- parse_res = _XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ parse_res = _XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE);
XML_ParserFree(ext_parser);
return parse_res;
XML_SetUserData(parser, dtd_data);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_public);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetSkippedEntityHandler(parser, dummy_skip_handler);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (dummy_handler_flags != DUMMY_SKIP_HANDLER_FLAG)
"<!ENTITY % e1 SYSTEM 'bar'>\n"
"%e1;\n";
XML_Parser ext_parser;
- int clear_handler = (intptr_t)XML_GetUserData(parser);
+ intptr_t clear_handler = (intptr_t)XML_GetUserData(parser);
if (systemId == NULL || !xcstrcmp(systemId, XCS("bar")))
return XML_STATUS_OK;
fail("Could note create external entity parser");
if (clear_handler)
XML_SetExternalEntityRefHandler(ext_parser, NULL);
- if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(ext_parser);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_devaluer);
XML_SetUserData(parser, (void *)(intptr_t)XML_FALSE);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_devaluer);
XML_SetUserData(parser, (void *)(intptr_t)XML_TRUE);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetXmlDeclHandler(parser, aborting_xdecl_handler);
resumable = XML_TRUE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_SUSPENDED)
xml_failure(parser);
if (XML_GetErrorCode(parser) != XML_ERROR_NONE)
xml_failure(parser);
/* Attempt to start a new parse while suspended */
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
fail("Attempt to parse while suspended not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED)
fail("Suspended parse not faulted with correct error");
XML_SetDefaultHandler(parser, selective_aborting_default_handler);
XML_SetUserData(parser, match);
resumable = XML_FALSE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
fail("Abort not triggered");
if (XML_GetErrorCode(parser) != XML_ERROR_ABORTED)
XML_SetDefaultHandler(parser, selective_aborting_default_handler);
XML_SetUserData(parser, match);
resumable = XML_TRUE;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_SUSPENDED)
xml_failure(parser);
}
END_TEST
+static void XMLCALL
+suspending_end_handler(void *userData,
+ const XML_Char *UNUSED_P(s))
+{
+ XML_StopParser((XML_Parser)userData, 1);
+}
+
+START_TEST(test_suspend_in_sole_empty_tag)
+{
+ const char *text = "<doc/>";
+ enum XML_Status rc;
+
+ XML_SetEndElementHandler(parser, suspending_end_handler);
+ XML_SetUserData(parser, parser);
+ rc = _XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
+ XML_TRUE);
+ if (rc == XML_STATUS_ERROR)
+ xml_failure(parser);
+ else if (rc != XML_STATUS_SUSPENDED)
+ fail("Suspend not triggered");
+ rc = XML_ResumeParser(parser);
+ if (rc == XML_STATUS_ERROR)
+ xml_failure(parser);
+ else if (rc != XML_STATUS_OK)
+ fail("Resume failed");
+}
+END_TEST
+
START_TEST(test_unfinished_epilog)
{
const char *text = "<doc></doc><";
const char *text = "<doc></doc>\xe2\x82";
/* First check that no fault is raised if the parse is not finished */
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
/* Now check that it is faulted once we finish */
"</doc>\n";
XML_SetHashSalt(parser, COLLIDING_HASH_SALT);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetStartElementHandler(parser, start_element_suspender);
XML_SetCharacterDataHandler(parser, accumulate_characters);
XML_SetUserData(parser, &storage);
- if (XML_Parse(parser, text, strlen(text),
+ if (XML_Parse(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_SUSPENDED)
xml_failure(parser);
CharData_CheckXMLChars(&storage, XCS(""));
"<doc>&foo;</doc>\n";
XML_SetStartElementHandler(parser, start_element_suspender);
- if (XML_Parse(parser, text, strlen(text),
+ if (XML_Parse(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_SUSPENDED)
xml_failure(parser);
if (XML_ResumeParser(parser) != XML_STATUS_ERROR)
XML_SetElementDeclHandler(parser, element_decl_suspender);
XML_SetCharacterDataHandler(parser, accumulate_characters);
XML_SetUserData(parser, &storage);
- if (XML_Parse(parser, text, strlen(text),
+ if (XML_Parse(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_SUSPENDED)
xml_failure(parser);
CharData_CheckXMLChars(&storage, XCS(""));
{
const char *text = "<$doc><doc></doc>";
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
fail("Invalid tag name not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN)
xml_failure(parser);
{
const char *text = "<doc a='value\r'/>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
"<doc att2='any'/>";
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetUserData(parser, &test_data);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_loader);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetExternalEntityRefHandler(ext_parser, test_data->handler);
if ( _XML_Parse_SINGLE_BYTES(ext_parser,
test_data->parse_text,
- strlen(test_data->parse_text),
+ (int)strlen(test_data->parse_text),
XML_TRUE) == XML_STATUS_ERROR) {
xml_failure(ext_parser);
}
XML_SetUserData(parser, &test_data);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_oneshot_loader);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
XML_SetUserData(parser, &test_data);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_oneshot_loader);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
entity_name_to_match = XCS(PARAM_ENTITY_NAME);
entity_value_to_match = XCS(PARAM_ENTITY_CORE_VALUE) XCS("\n");
entity_match_flag = ENTITY_MATCH_NOT_FOUND;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (entity_match_flag == ENTITY_MATCH_FAIL)
/* <doc>&entity;</doc> */
"\0<\0d\0o\0c\0>\0&\0e\0n\0t\0i\0t\0y\0;\0<\0/\0d\0o\0c\0>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) != XML_STATUS_ERROR)
fail("Invalid start of entity name not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_UNDEFINED_ENTITY)
CharData_Init(&storage);
XML_SetDefaultHandler(parser, accumulate_characters);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE)== XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetDefaultHandler(parser, accumulate_characters);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetCommentHandler(parser, accumulate_comment);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetCommentHandler(parser, accumulate_comment);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL);
XML_SetStartElementHandler(parser, record_element_start_handler);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL);
XML_SetStartElementHandler(parser, record_element_start_handler);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
}
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (XML_Parse(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
}
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetElementHandler(parser, record_element_start_handler,
record_element_end_handler);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetStartElementHandler(parser, accumulate_attribute);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetStartElementHandler(parser, accumulate_attribute);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetEntityDeclHandler(parser, accumulate_entity_decl);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
"\0#\x0e\x04\x0e\x08\0>\0\n"
"\0]\0>\0<\0d\0/\0>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) != XML_STATUS_ERROR)
fail("Invalid UTF16 attribute keyword not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_SYNTAX)
"\x06\xf2"
"\0 \0]\0>\0<\0d\0o\0c\0/\0>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) != XML_STATUS_ERROR)
fail("Invalid bytes in DOCTYPE not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_SYNTAX)
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetStartElementHandler(parser, accumulate_attribute);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetStartElementHandler(parser, accumulate_attribute);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetExternalEntityRefHandler(parser, external_entity_loader2);
XML_SetUserData(parser, &test_data);
XML_SetCharacterDataHandler(parser, ext2_accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetUserData(parser, &test_data);
XML_SetDefaultHandler(parser, checking_default_handler);
XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
for (i = 0; test_data[i].expected != NULL; i++)
const char *text = "<abort/>";
XML_SetStartElementHandler(parser, start_element_suspender);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
fail("Expected to error on abort");
}
XCS("http://example.org/ a bar")
};
XML_SetReturnNSTriplet(parser, XML_TRUE);
- XML_SetUserData(parser, elemstr);
+ XML_SetUserData(parser, (void *)elemstr);
XML_SetElementHandler(parser, triplet_start_checker,
triplet_end_checker);
XML_SetNamespaceDeclHandler(parser,
triplet_start_flag = XML_FALSE;
triplet_end_flag = XML_FALSE;
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
if (!triplet_start_flag)
fail("triplet_start_checker not invoked");
/* Check that unsetting "return triplets" fails while still parsing */
XML_SetReturnNSTriplet(parser, XML_FALSE);
- if (_XML_Parse_SINGLE_BYTES(parser, epilog, strlen(epilog),
+ if (_XML_Parse_SINGLE_BYTES(parser, epilog, (int)strlen(epilog),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
if (!triplet_end_flag)
XML_SetUserData(parser, &storage);
XML_SetElementHandler(parser,
overwrite_start_checker, overwrite_end_checker);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, result);
}
XML_SetStartNamespaceDeclHandler(parser, start_ns_clearing_start_element);
XML_SetEndNamespaceDeclHandler(parser, dummy_end_namespace_decl_handler);
XML_UseParserAsHandlerArg(parser);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
XML_SetUserData(parser, (void *) callno);
p2 = XML_ExternalEntityParserCreate(parser, context, NULL);
- if (_XML_Parse_SINGLE_BYTES(p2, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) {
+ if (_XML_Parse_SINGLE_BYTES(p2, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) {
xml_failure(p2);
return XML_STATUS_ERROR;
}
/* We actually need to set this handler to tickle this bug. */
XML_SetStartElementHandler(parser, dummy_start_element);
XML_SetUserData(parser, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
XCS("http://example.org/ doc prefix")
};
XML_SetReturnNSTriplet(parser, XML_TRUE);
- XML_SetUserData(parser, elemstr);
+ XML_SetUserData(parser, (void *)elemstr);
XML_SetEndElementHandler(parser, triplet_end_checker);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
"]>\n"
"<prefix:doc/>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
fail("Unbound prefix incorrectly passed");
if (XML_GetErrorCode(parser) != XML_ERROR_UNBOUND_PREFIX)
dummy_start_namespace_decl_handler);
XML_SetEndNamespaceDeclHandler(parser,
dummy_end_namespace_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
const char *text =
"<doc xmlns:a='http://example.org/a'\n"
" a:a='v' a:i='w' />";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
};
XML_SetReturnNSTriplet(parser, XML_TRUE);
- XML_SetUserData(parser, elemstr);
+ XML_SetUserData(parser, (void *)elemstr);
XML_SetElementHandler(parser,
triplet_start_checker,
triplet_end_checker);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
" xmlns:bar='http://example.org/'>"
"</e>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
" <foo:thisisalongenoughnametotriggerallocationaction"
" foo:a='12' />"
"</foo:e>";
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
expect_failure(text1, XML_ERROR_RESERVED_PREFIX_XMLNS,
"xmlns not rejected as an attribute");
XML_ParserReset(parser, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
"='foo'\n>"
"</doc>";
- if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1),
XML_FALSE) == XML_STATUS_ERROR)
xml_failure(parser);
- if (_XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
+ if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
CharData_Init(&storage);
XML_SetStartElementHandler(parser, accumulate_attribute);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
CharData_Init(&storage);
XML_SetStartElementHandler(parser, start_element_event_handler);
XML_SetUserData(parser, &storage);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
XML_SetUserData(parser, &storage);
XML_SetStartElementHandler(parser, start_element_event_handler);
XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
#define ALLOC_ALWAYS_SUCCEED (-1)
#define REALLOC_ALWAYS_SUCCEED (-1)
-static int allocation_count = ALLOC_ALWAYS_SUCCEED;
-static int reallocation_count = REALLOC_ALWAYS_SUCCEED;
+static intptr_t allocation_count = ALLOC_ALWAYS_SUCCEED;
+static intptr_t reallocation_count = REALLOC_ALWAYS_SUCCEED;
/* Crocked allocator for allocation failure tests */
static void *duff_allocator(size_t size)
fail("Version mismatch");
#if ! defined(XML_UNICODE) || defined(XML_UNICODE_WCHAR_T)
- if (xcstrcmp(version_text, XCS("expat_2.2.5"))) /* needs bump on releases */
+ if (xcstrcmp(version_text, XCS("expat_2.2.6"))) /* needs bump on releases */
fail("XML_*_VERSION in expat.h out of sync?\n");
#else
/* If we have XML_UNICODE defined but not XML_UNICODE_WCHAR_T
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetCharacterDataHandler(parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1,
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1,
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
CharData_CheckXMLChars(&storage, expected);
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetXmlDeclHandler(parser, dummy_xdecl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* Resetting the parser is insufficient, because some memory
allocation_count = i;
XML_SetXmlDeclHandler(parser, dummy_xdecl_handler);
XML_SetUnknownEncodingHandler(parser, long_encoding_handler, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetProcessingInstructionHandler(parser, dummy_pi_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetProcessingInstructionHandler(parser, dummy_pi_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetProcessingInstructionHandler(parser, dummy_pi_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetCommentHandler(parser, dummy_comment_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetCommentHandler(parser, dummy_comment_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetUserData(parser, foo_text);
XML_SetExternalEntityRefHandler(parser,
external_entity_duff_loader);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) {
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) {
fail("External parser allocator returned success incorrectly");
}
}
XML_SetExternalEntityRefHandler(parser,
external_entity_null_loader);
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
alloc_teardown();
}
allocation_count = ALLOC_ALWAYS_SUCCEED;
- if (_XML_Parse_SINGLE_BYTES(new_parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR) {
+ if (_XML_Parse_SINGLE_BYTES(new_parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) {
xml_failure(new_parser);
return XML_STATUS_ERROR;
}
XML_SetExternalEntityRefHandler(parser,
external_entity_dbl_handler);
XML_SetUserData(parser, NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
}
END_TEST
NULL);
if (new_parser == NULL)
return XML_STATUS_ERROR;
- rv = _XML_Parse_SINGLE_BYTES(new_parser, text, strlen(text),
+ rv = _XML_Parse_SINGLE_BYTES(new_parser, text, (int)strlen(text),
XML_TRUE);
} else {
/* Just run through once */
new_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
if (new_parser == NULL)
return XML_STATUS_ERROR;
- rv =_XML_Parse_SINGLE_BYTES(new_parser, text, strlen(text),
+ rv =_XML_Parse_SINGLE_BYTES(new_parser, text, (int)strlen(text),
XML_TRUE);
}
XML_ParserFree(new_parser);
external_entity_dbl_handler_2);
XML_SetUserData(parser, NULL);
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_OK)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_ParserFree(ext_parser);
return XML_STATUS_ERROR;
}
- status = _XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ status = _XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE);
XML_ParserFree(ext_parser);
if (status == XML_STATUS_ERROR)
XML_SetExternalEntityRefHandler(parser,
external_entity_alloc_set_encoding);
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_OK)
break;
allocation_count = -1;
XML_SetUnknownEncodingHandler(parser,
unknown_released_encoding_handler,
NULL);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
alloc_teardown();
CharData_Init(&storage);
XML_SetUserData(parser, &storage);
XML_SetCharacterDataHandler(parser, accumulate_characters);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
if (buffer == NULL)
fail("1.5K buffer reallocation failed");
memcpy(buffer, text, strlen(text));
- if (XML_ParseBuffer(parser, strlen(text),
+ if (XML_ParseBuffer(parser, (int)strlen(text),
XML_FALSE) == XML_STATUS_OK)
break;
/* See comment in test_alloc_parse_xdecl() */
if (buffer == NULL)
fail("Buffer allocation failed");
memcpy(buffer, text, strlen(text));
- status = XML_ParseBuffer(ext_parser, strlen(text), XML_FALSE);
+ status = XML_ParseBuffer(ext_parser, (int)strlen(text), XML_FALSE);
reallocation_count = -1;
XML_ParserFree(ext_parser);
return (status == XML_STATUS_OK) ? XML_STATUS_OK : XML_STATUS_ERROR;
XML_SetExternalEntityRefHandler(parser,
external_entity_reallocator);
XML_SetUserData(parser, (void *)(intptr_t)i);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) == XML_STATUS_OK)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetExternalEntityRefHandler(parser, external_entity_public);
/* Provoke a particular code path */
XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetUserData(parser, dtd_text);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_public);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetDoctypeDeclHandler(parser,
dummy_start_doctype_decl_handler,
dummy_end_doctype_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetDoctypeDeclHandler(parser,
dummy_start_doctype_decl_handler,
dummy_end_doctype_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
if (ext_parser == NULL)
return XML_STATUS_ERROR;
- parse_res = _XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ parse_res = _XML_Parse_SINGLE_BYTES(ext_parser, text, (int)strlen(text),
XML_TRUE);
XML_ParserFree(ext_parser);
return parse_res;
XML_SetExternalEntityRefHandler(parser, external_entity_alloc);
if (XML_UseForeignDTD(parser, XML_TRUE) != XML_ERROR_NONE)
fail("Could not set foreign DTD");
- if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
/* An attribute list handler provokes a different code path */
XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
/* An attribute list handler provokes a different code path */
XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
dummy_handler_flags = 0;
XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler);
XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
allocation_count = i;
dummy_handler_flags = 0;
XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
allocation_count = i;
dummy_handler_flags = 0;
XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetStartElementHandler(parser, record_element_start_handler);
XML_SetUserData(parser, &storage);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetStartElementHandler(parser, record_element_start_handler);
XML_SetUserData(parser, &storage);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
allocation_count = i;
XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
reallocation_count = i;
XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
allocation_count = i;
XML_SetProcessingInstructionHandler(parser, dummy_pi_handler);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
allocation_count = i;
XML_SetCommentHandler(parser, dummy_comment_handler);
dummy_handler_flags = 0;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetUserData(parser, dtd_text);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_alloc);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetUserData(parser, dtd_text);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_alloc);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_ParserReset(parser, NULL);
continue;
}
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetUserData(parser, entity_text);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_alloc);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetUserData(parser, entity_text);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_alloc);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_alloc_parse_xdecl() */
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
allocation_count = i;
/* Exercise more code paths with a default handler */
XML_SetDefaultHandler(parser, dummy_default_handler);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* Resetting the parser is insufficient, because some memory
/* Get the parser into suspended state */
XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler);
resumable = XML_TRUE;
- buffer = XML_GetBuffer(parser, strlen(text));
+ buffer = XML_GetBuffer(parser, (int)strlen(text));
if (buffer == NULL)
fail("Could not acquire parse buffer");
memcpy(buffer, text, strlen(text));
- if (XML_ParseBuffer(parser, strlen(text),
+ if (XML_ParseBuffer(parser, (int)strlen(text),
XML_TRUE) != XML_STATUS_SUSPENDED)
xml_failure(parser);
if (XML_GetErrorCode(parser) != XML_ERROR_NONE)
xml_failure(parser);
- if (XML_ParseBuffer(parser, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (XML_ParseBuffer(parser, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
fail("Suspended XML_ParseBuffer not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED)
xml_failure(parser);
- if (XML_GetBuffer(parser, strlen(text)) != NULL)
+ if (XML_GetBuffer(parser, (int)strlen(text)) != NULL)
fail("Suspended XML_GetBuffer not faulted");
/* Get it going again and complete the world */
XML_SetCharacterDataHandler(parser, NULL);
if (XML_ResumeParser(parser) != XML_STATUS_OK)
xml_failure(parser);
- if (XML_ParseBuffer(parser, strlen(text), XML_TRUE) != XML_STATUS_ERROR)
+ if (XML_ParseBuffer(parser, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR)
fail("Post-finishing XML_ParseBuffer not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_FINISHED)
xml_failure(parser);
- if (XML_GetBuffer(parser, strlen(text)) != NULL)
+ if (XML_GetBuffer(parser, (int)strlen(text)) != NULL)
fail("Post-finishing XML_GetBuffer not faulted");
}
END_TEST
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetReturnNSTriplet(parser, XML_TRUE);
- XML_SetUserData(parser, elemstr);
+ XML_SetUserData(parser, (void *)elemstr);
XML_SetElementHandler(parser,
triplet_start_checker,
triplet_end_checker);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
XML_SetReturnNSTriplet(parser, XML_TRUE);
- XML_SetUserData(parser, elemstr);
+ XML_SetUserData(parser, (void *)elemstr);
XML_SetElementHandler(parser,
triplet_start_checker,
triplet_end_checker);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
const unsigned max_realloc_count = 10;
/* First, do a full parse that will leave bindings around */
- if (_XML_Parse_SINGLE_BYTES(parser, first, strlen(first),
+ if (_XML_Parse_SINGLE_BYTES(parser, first, (int)strlen(first),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
for (i = 0; i < max_realloc_count; i++) {
XML_ParserReset(parser, NULL);
reallocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, second, strlen(second),
+ if (_XML_Parse_SINGLE_BYTES(parser, second, (int)strlen(second),
XML_TRUE) != XML_STATUS_ERROR)
break;
}
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_realloc_count; i++) {
reallocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1),
XML_FALSE) != XML_STATUS_ERROR &&
- _XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
+ _XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
for (i = 0; i < max_alloc_count; i++) {
allocation_count = i;
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text1, strlen(text1),
+ if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1),
XML_FALSE) != XML_STATUS_ERROR &&
- _XML_Parse_SINGLE_BYTES(parser, text2, strlen(text2),
+ _XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2),
XML_TRUE) != XML_STATUS_ERROR)
break;
/* See comment in test_nsalloc_xmlns() */
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
XML_SetUserData(parser, options);
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
XML_SetExternalEntityRefHandler(parser, external_entity_optioner);
- if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
tcase_add_test(tc_basic, test_abort_epilog);
tcase_add_test(tc_basic, test_abort_epilog_2);
tcase_add_test(tc_basic, test_suspend_epilog);
+ tcase_add_test(tc_basic, test_suspend_in_sole_empty_tag);
tcase_add_test(tc_basic, test_unfinished_epilog);
tcase_add_test(tc_basic, test_partial_char_in_epilog);
tcase_add_test(tc_basic, test_hash_collision);