• Home
  • Raw
  • Download

Lines Matching refs:parser

113 static XML_Parser parser = NULL;  variable
119 parser = XML_ParserCreate(NULL); in basic_setup()
120 if (parser == NULL) in basic_setup()
127 if (parser != NULL) { in basic_teardown()
128 XML_ParserFree(parser); in basic_teardown()
129 parser = NULL; in basic_teardown()
138 _xml_failure(XML_Parser parser, const char *file, int line) in _xml_failure() argument
141 enum XML_Error err = XML_GetErrorCode(parser); in _xml_failure()
148 XML_GetCurrentLineNumber(parser), in _xml_failure()
149 XML_GetCurrentColumnNumber(parser), in _xml_failure()
155 _XML_Parse_SINGLE_BYTES(XML_Parser parser, const char *s, int len, int isFinal) in _XML_Parse_SINGLE_BYTES() argument
161 return XML_Parse(parser, s, len, isFinal); in _XML_Parse_SINGLE_BYTES()
167 res = XML_Parse(parser, &c, sizeof(char), innerIsFinal); in _XML_Parse_SINGLE_BYTES()
175 #define xml_failure(parser) _xml_failure((parser), __FILE__, __LINE__) argument
181 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_OK) in _expect_failure()
185 if (XML_GetErrorCode(parser) != errorCode) in _expect_failure()
186 _xml_failure(parser, file, lineno); in _expect_failure()
274 XML_FreeContentModel(parser, model); in dummy_element_decl_handler()
396 external_entity_optioner(XML_Parser parser, in external_entity_optioner() argument
402 ExtOption *options = (ExtOption *)XML_GetUserData(parser); in external_entity_optioner()
409 XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_optioner()
474 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text) - 1, XML_TRUE) == XML_STATUS_OK) in START_TEST()
476 if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) in START_TEST()
477 xml_failure(parser); in START_TEST()
534 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
535 xml_failure(parser); in START_TEST()
543 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
544 xml_failure(parser); in START_TEST()
552 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
553 xml_failure(parser); in START_TEST()
562 if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
563 xml_failure(parser); in START_TEST()
598 XML_SetUserData(parser, &storage); in _run_character_check()
599 XML_SetCharacterDataHandler(parser, accumulate_characters); in _run_character_check()
600 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in _run_character_check()
601 _xml_failure(parser, file, line); in _run_character_check()
615 XML_SetUserData(parser, &storage); in _run_attribute_check()
616 XML_SetStartElementHandler(parser, accumulate_attribute); in _run_attribute_check()
617 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in _run_attribute_check()
618 _xml_failure(parser, file, line); in _run_attribute_check()
648 XML_SetUserData(parser, test_data); in _run_ext_character_check()
649 XML_SetCharacterDataHandler(parser, ext_accumulate_characters); in _run_ext_character_check()
650 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in _run_ext_character_check()
652 _xml_failure(parser, file, line); in _run_ext_character_check()
769 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_OK) { in START_TEST()
775 else if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) in START_TEST()
776 xml_failure(parser); in START_TEST()
778 XML_ParserReset(parser, NULL); in START_TEST()
870 XML_SetUserData(parser, &storage); in START_TEST()
871 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
872 if (_XML_Parse_SINGLE_BYTES(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
873 xml_failure(parser); in START_TEST()
888 if ( _XML_Parse_SINGLE_BYTES(parser, text, first_chunk_bytes, XML_FALSE) in START_TEST()
890 xml_failure(parser); in START_TEST()
893 rc = _XML_Parse_SINGLE_BYTES(parser, text + first_chunk_bytes, in START_TEST()
896 xml_failure(parser); in START_TEST()
909 XML_SetXmlDeclHandler(parser, dummy_xdecl_handler); in START_TEST()
921 if (!XML_SetEncoding(parser, XCS("unknown-encoding"))) in START_TEST()
951 XML_ParserReset(parser, NULL); in START_TEST()
954 XML_ParserReset(parser, NULL); in START_TEST()
955 XML_SetDefaultHandler(parser, dummy_default_handler); in START_TEST()
957 XML_ParserReset(parser, NULL); in START_TEST()
958 XML_SetDefaultHandler(parser, dummy_default_handler); in START_TEST()
1109 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
1110 xml_failure(parser); in START_TEST()
1111 lineno = XML_GetCurrentLineNumber(parser); in START_TEST()
1127 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
1128 xml_failure(parser); in START_TEST()
1129 colno = XML_GetCurrentColumnNumber(parser); in START_TEST()
1147 XML_GetCurrentColumnNumber(parser), in start_element_event_handler2()
1148 XML_GetCurrentLineNumber(parser), in start_element_event_handler2()
1157 XML_GetCurrentColumnNumber(parser), in end_element_event_handler2()
1158 XML_GetCurrentLineNumber(parser), in end_element_event_handler2()
1190 XML_SetUserData(parser, &storage); in START_TEST()
1191 XML_SetStartElementHandler(parser, start_element_event_handler2); in START_TEST()
1192 XML_SetEndElementHandler(parser, end_element_event_handler2); in START_TEST()
1193 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1194 xml_failure(parser); in START_TEST()
1209 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) != XML_STATUS_ERROR) in START_TEST()
1212 lineno = XML_GetCurrentLineNumber(parser); in START_TEST()
1229 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) != XML_STATUS_ERROR) in START_TEST()
1232 colno = XML_GetCurrentColumnNumber(parser); in START_TEST()
1272 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1273 xml_failure(parser); in START_TEST()
1311 XML_SetCharacterDataHandler(parser, dummy_cdata_handler); in START_TEST()
1312 buffer = XML_GetBuffer(parser, parse_len); in START_TEST()
1316 if (XML_ParseBuffer(parser, parse_len, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1317 xml_failure(parser); in START_TEST()
1349 XML_SetUserData(parser, &storage); in START_TEST()
1350 XML_SetEndElementHandler(parser, end_element_event_handler); in START_TEST()
1351 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1352 xml_failure(parser); in START_TEST()
1463 XML_SetStartElementHandler(parser, in START_TEST()
1465 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1466 xml_failure(parser); in START_TEST()
1533 XML_SetUnknownEncodingHandler(parser, UnknownEncodingHandler, NULL); in START_TEST()
1534 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1535 xml_failure(parser); in START_TEST()
1562 XML_SetUnknownEncodingHandler(parser, in START_TEST()
1565 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
1572 external_entity_loader(XML_Parser parser, in external_entity_loader() argument
1578 ExtTest *test_data = (ExtTest *)XML_GetUserData(parser); in external_entity_loader()
1581 extparser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_loader()
1621 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
1635 XML_SetDefaultHandler(parser, dummy_default_handler); in START_TEST()
1661 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
1677 external_entity_faulter(XML_Parser parser, in external_entity_faulter() argument
1684 ExtFaults *fault = (ExtFaults *)XML_GetUserData(parser); in external_entity_faulter()
1686 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_faulter()
1719 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
1720 XML_SetUserData(parser, &fault); in START_TEST()
1741 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
1742 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
1743 XML_SetUserData(parser, &fault); in START_TEST()
1757 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
1758 xml_failure(parser); in START_TEST()
1801 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
1802 XML_SetUserData(parser, &test_data); in START_TEST()
1803 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
1820 XML_SetParamEntityParsing(parser, in START_TEST()
1822 XML_SetUserData(parser, &test_data); in START_TEST()
1823 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
1844 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
1845 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
1869 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
1870 XML_SetUserData(parser, &test_data); in START_TEST()
1871 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
1872 XML_SetNotStandaloneHandler(parser, reject_not_standalone_handler); in START_TEST()
1877 XML_ParserReset(parser, NULL); in START_TEST()
1878 XML_SetNotStandaloneHandler(parser, reject_not_standalone_handler); in START_TEST()
1903 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
1904 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
1905 XML_SetNotStandaloneHandler(parser, accept_not_standalone_handler); in START_TEST()
1909 XML_ParserReset(parser, NULL); in START_TEST()
1910 XML_SetNotStandaloneHandler(parser, accept_not_standalone_handler); in START_TEST()
1961 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
1962 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
1963 XML_SetUserData(parser, (void *)fault); in START_TEST()
1967 XML_ParserReset(parser, NULL); in START_TEST()
1986 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
1987 XML_SetStartDoctypeDeclHandler(parser, dummy_start_doctype_handler); in START_TEST()
1988 XML_SetEndDoctypeDeclHandler(parser, dummy_end_doctype_handler); in START_TEST()
1989 XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); in START_TEST()
1990 XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); in START_TEST()
1991 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
1992 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
1993 XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); in START_TEST()
1994 XML_SetCommentHandler(parser, dummy_comment_handler); in START_TEST()
1995 XML_SetStartCdataSectionHandler(parser, dummy_start_cdata_handler); in START_TEST()
1996 XML_SetEndCdataSectionHandler(parser, dummy_end_cdata_handler); in START_TEST()
2091 XML_SetAttlistDeclHandler(parser, verify_attlist_decl_handler); in START_TEST()
2092 XML_SetUserData(parser, test); in START_TEST()
2093 if (_XML_Parse_SINGLE_BYTES(parser, prolog, (int)strlen(prolog), in START_TEST()
2095 xml_failure(parser); in START_TEST()
2096 if (_XML_Parse_SINGLE_BYTES(parser, in START_TEST()
2100 xml_failure(parser); in START_TEST()
2101 XML_ParserReset(parser, NULL); in START_TEST()
2119 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
2120 xml_failure(parser); in START_TEST()
2137 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
2138 xml_failure(parser); in START_TEST()
2172 XML_StopParser(parser, resumable); in clearing_aborting_character_handler()
2173 XML_SetCharacterDataHandler(parser, NULL); in clearing_aborting_character_handler()
2188 XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); in START_TEST()
2190 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
2191 xml_failure(parser); in START_TEST()
2192 if (XML_GetErrorCode(parser) != XML_ERROR_ABORTED) in START_TEST()
2193 xml_failure(parser); in START_TEST()
2209 XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); in START_TEST()
2211 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_SUSPENDED) in START_TEST()
2212 xml_failure(parser); in START_TEST()
2213 if (XML_GetErrorCode(parser) != XML_ERROR_NONE) in START_TEST()
2214 xml_failure(parser); in START_TEST()
2216 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
2218 if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED) in START_TEST()
2231 XML_StopParser(parser, resumable); in parser_stop_character_handler()
2232 XML_SetCharacterDataHandler(parser, NULL); in parser_stop_character_handler()
2235 if (XML_StopParser(parser, XML_FALSE) != XML_STATUS_ERROR) in parser_stop_character_handler()
2237 if (XML_GetErrorCode(parser) != XML_ERROR_FINISHED) in parser_stop_character_handler()
2238 xml_failure(parser); in parser_stop_character_handler()
2241 if (XML_StopParser(parser, XML_FALSE) == XML_STATUS_ERROR) in parser_stop_character_handler()
2242 xml_failure(parser); in parser_stop_character_handler()
2245 if (XML_StopParser(parser, XML_TRUE) != XML_STATUS_ERROR) in parser_stop_character_handler()
2247 if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED) in parser_stop_character_handler()
2248 xml_failure(parser); in parser_stop_character_handler()
2257 XML_SetCharacterDataHandler(parser, parser_stop_character_handler); in START_TEST()
2260 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
2264 XML_ParserReset(parser, NULL); in START_TEST()
2265 XML_SetCharacterDataHandler(parser, parser_stop_character_handler); in START_TEST()
2268 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
2272 XML_ParserReset(parser, NULL); in START_TEST()
2273 XML_SetCharacterDataHandler(parser, parser_stop_character_handler); in START_TEST()
2276 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
2290 XML_SetUserData(parser, &storage); in START_TEST()
2291 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
2293 XML_SetStartCdataSectionHandler(parser, dummy_start_cdata_handler); in START_TEST()
2294 XML_SetEndCdataSectionHandler(parser, dummy_end_cdata_handler); in START_TEST()
2296 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
2297 xml_failure(parser); in START_TEST()
2301 XML_ParserReset(parser, NULL); in START_TEST()
2303 XML_SetUserData(parser, &storage); in START_TEST()
2304 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
2305 XML_SetDefaultHandler(parser, dummy_default_handler); in START_TEST()
2307 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
2308 xml_failure(parser); in START_TEST()
2329 XML_SetUserData(parser, &storage); in START_TEST()
2330 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
2332 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
2333 xml_failure(parser); in START_TEST()
2354 XML_SetUserData(parser, &storage); in START_TEST()
2355 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
2357 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
2358 xml_failure(parser); in START_TEST()
2422 XML_SetUserData(parser, &storage); in START_TEST()
2423 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
2424 buffer = XML_GetBuffer(parser, sizeof(text) - 1); in START_TEST()
2428 if (XML_ParseBuffer(parser, in START_TEST()
2431 xml_failure(parser); in START_TEST()
2466 XML_SetUserData(parser, &storage); in START_TEST()
2467 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
2469 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
2470 xml_failure(parser); in START_TEST()
2495 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text) - 1, in START_TEST()
2498 if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) in START_TEST()
2499 xml_failure(parser); in START_TEST()
2541 parser, cases[i].text, (int)strlen(cases[i].text), XML_TRUE); in START_TEST()
2542 const enum XML_Error actualError = XML_GetErrorCode(parser); in START_TEST()
2553 XML_ParserReset(parser, NULL); in START_TEST()
2613 if (_XML_Parse_SINGLE_BYTES(parser, prolog, (int)sizeof(prolog)-1, in START_TEST()
2615 xml_failure(parser); in START_TEST()
2616 actual_status = _XML_Parse_SINGLE_BYTES(parser, in START_TEST()
2621 actual_error = XML_GetErrorCode(parser); in START_TEST()
2635 XML_ParserReset(parser, NULL); in START_TEST()
2669 XML_SetCharacterDataHandler(parser, in START_TEST()
2683 XML_SetCharacterDataHandler(parser, in START_TEST()
2686 result = _XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE); in START_TEST()
2689 xml_failure(parser); in START_TEST()
2692 if (XML_GetErrorCode(parser) != XML_ERROR_NONE) in START_TEST()
2693 xml_failure(parser); in START_TEST()
2700 char *buffer = (char *)XML_MemMalloc(parser, 256); in START_TEST()
2715 p = (char *)XML_MemRealloc(parser, buffer, 512); in START_TEST()
2727 XML_MemFree(parser, buffer); in START_TEST()
2746 XML_DefaultCurrent(parser); in record_cdata_handler()
2777 XML_SetDefaultHandler(parser, record_default_handler); in START_TEST()
2778 XML_SetCharacterDataHandler(parser, record_cdata_handler); in START_TEST()
2780 XML_SetUserData(parser, &storage); in START_TEST()
2781 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
2783 xml_failure(parser); in START_TEST()
2787 XML_ParserReset(parser, NULL); in START_TEST()
2788 XML_SetDefaultHandler(parser, record_default_handler); in START_TEST()
2789 XML_SetCharacterDataHandler(parser, record_cdata_nodefault_handler); in START_TEST()
2791 XML_SetUserData(parser, &storage); in START_TEST()
2792 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
2794 xml_failure(parser); in START_TEST()
2798 XML_ParserReset(parser, NULL); in START_TEST()
2799 XML_SetDefaultHandler(parser, record_default_handler); in START_TEST()
2800 XML_SetCharacterDataHandler(parser, record_cdata_handler); in START_TEST()
2802 XML_SetUserData(parser, &storage); in START_TEST()
2803 if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text), in START_TEST()
2805 xml_failure(parser); in START_TEST()
2810 XML_ParserReset(parser, NULL); in START_TEST()
2811 XML_SetDefaultHandler(parser, record_default_handler); in START_TEST()
2812 XML_SetCharacterDataHandler(parser, record_cdata_handler); in START_TEST()
2813 XML_SetSkippedEntityHandler(parser, record_skip_handler); in START_TEST()
2815 XML_SetUserData(parser, &storage); in START_TEST()
2816 if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text), in START_TEST()
2818 xml_failure(parser); in START_TEST()
2823 XML_ParserReset(parser, NULL); in START_TEST()
2824 XML_SetDefaultHandlerExpand(parser, record_default_handler); in START_TEST()
2825 XML_SetCharacterDataHandler(parser, record_cdata_handler); in START_TEST()
2827 XML_SetUserData(parser, &storage); in START_TEST()
2828 if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text), in START_TEST()
2830 xml_failure(parser); in START_TEST()
2834 XML_ParserReset(parser, NULL); in START_TEST()
2835 XML_SetDefaultHandlerExpand(parser, record_default_handler); in START_TEST()
2836 XML_SetCharacterDataHandler(parser, record_cdata_nodefault_handler); in START_TEST()
2838 XML_SetUserData(parser, &storage); in START_TEST()
2839 if (_XML_Parse_SINGLE_BYTES(parser, entity_text, (int)strlen(entity_text), in START_TEST()
2841 xml_failure(parser); in START_TEST()
2856 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
2857 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
2859 xml_failure(parser); in START_TEST()
2877 XML_SetHashSalt(parser, 0x12345678); in START_TEST()
2878 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
2879 XML_SetUserData(parser, &test_data); in START_TEST()
2880 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
2882 XML_SetDefaultHandler(parser, dummy_default_handler); in START_TEST()
2883 if (XML_UseForeignDTD(parser, XML_TRUE) != XML_ERROR_NONE) in START_TEST()
2885 if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1), in START_TEST()
2887 xml_failure(parser); in START_TEST()
2892 if (XML_UseForeignDTD(parser, XML_TRUE) != in START_TEST()
2896 if (XML_SetHashSalt(parser, 0x23456789)) in START_TEST()
2900 if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2), in START_TEST()
2902 xml_failure(parser); in START_TEST()
2918 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
2919 XML_SetUserData(parser, &test_data); in START_TEST()
2920 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
2921 XML_SetNotStandaloneHandler(parser, reject_not_standalone_handler); in START_TEST()
2922 if (XML_UseForeignDTD(parser, XML_TRUE) != XML_ERROR_NONE) in START_TEST()
2942 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
2943 XML_SetUserData(parser, &test_data); in START_TEST()
2944 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
2945 XML_UseForeignDTD(parser, XML_TRUE); in START_TEST()
2967 XML_SetHashSalt(parser, 0x12345678); in START_TEST()
2968 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
2969 XML_SetUserData(parser, &test_data); in START_TEST()
2970 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
2972 XML_SetDefaultHandler(parser, dummy_default_handler); in START_TEST()
2973 if (XML_UseForeignDTD(parser, XML_TRUE) != XML_ERROR_NONE) in START_TEST()
2975 if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1), in START_TEST()
2977 xml_failure(parser); in START_TEST()
2982 if (XML_UseForeignDTD(parser, XML_TRUE) != in START_TEST()
2986 if (XML_SetHashSalt(parser, 0x23456789)) in START_TEST()
2990 if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2), in START_TEST()
2992 xml_failure(parser); in START_TEST()
2998 external_entity_null_loader(XML_Parser UNUSED_P(parser), in external_entity_null_loader() argument
3013 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3014 XML_SetUserData(parser, NULL); in START_TEST()
3015 XML_SetExternalEntityRefHandler(parser, external_entity_null_loader); in START_TEST()
3016 XML_UseForeignDTD(parser, XML_TRUE); in START_TEST()
3017 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3019 xml_failure(parser); in START_TEST()
3029 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3030 XML_SetExternalEntityRefHandler(parser, external_entity_null_loader); in START_TEST()
3031 XML_UseForeignDTD(parser, XML_TRUE); in START_TEST()
3043 old_base = XML_GetBase(parser); in START_TEST()
3044 if (XML_SetBase(parser, new_base) != XML_STATUS_OK) in START_TEST()
3046 if (xcstrcmp(XML_GetBase(parser), new_base) != 0) in START_TEST()
3048 if (XML_SetBase(parser, NULL) != XML_STATUS_OK) in START_TEST()
3050 if (XML_GetBase(parser) != NULL) in START_TEST()
3052 XML_SetBase(parser, old_base); in START_TEST()
3091 count = XML_GetSpecifiedAttributeCount(parser); in counting_start_element_handler()
3096 id = XML_GetIdAttributeIndex(parser); in counting_start_element_handler()
3153 XML_SetStartElementHandler(parser, counting_start_element_handler); in START_TEST()
3154 XML_SetUserData(parser, info); in START_TEST()
3155 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
3156 xml_failure(parser); in START_TEST()
3174 XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); in START_TEST()
3175 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
3176 xml_failure(parser); in START_TEST()
3177 XML_GetParsingStatus(parser, &status); in START_TEST()
3180 XML_ParserReset(parser, NULL); in START_TEST()
3181 XML_GetParsingStatus(parser, &status); in START_TEST()
3193 XML_SetCharacterDataHandler(parser, in START_TEST()
3195 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
3196 xml_failure(parser); in START_TEST()
3197 if (XML_ResumeParser(parser) == XML_STATUS_OK) in START_TEST()
3199 if (XML_GetErrorCode(parser) != XML_ERROR_UNCLOSED_TOKEN) in START_TEST()
3210 XML_SetCharacterDataHandler(parser, in START_TEST()
3212 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
3213 xml_failure(parser); in START_TEST()
3215 XML_SetCharacterDataHandler(parser, in START_TEST()
3217 if (XML_ResumeParser(parser) != XML_STATUS_SUSPENDED) in START_TEST()
3220 if (XML_ResumeParser(parser) != XML_STATUS_OK) in START_TEST()
3221 xml_failure(parser); in START_TEST()
3233 XML_SetUserData(parser, &storage); in START_TEST()
3234 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
3236 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3238 xml_failure(parser); in START_TEST()
3245 external_entity_resetter(XML_Parser parser, in external_entity_resetter() argument
3255 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_resetter()
3265 xml_failure(parser); in external_entity_resetter()
3296 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3297 XML_SetExternalEntityRefHandler(parser, external_entity_resetter); in START_TEST()
3298 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
3299 xml_failure(parser); in START_TEST()
3318 XML_FreeContentModel(parser, model); in entity_suspending_decl_handler()
3322 external_entity_suspender(XML_Parser parser, in external_entity_suspender() argument
3331 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_suspender()
3352 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3353 XML_SetExternalEntityRefHandler(parser, external_entity_suspender); in START_TEST()
3354 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
3355 xml_failure(parser); in START_TEST()
3374 external_entity_suspend_xmldecl(XML_Parser parser, in external_entity_suspend_xmldecl() argument
3385 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_suspend_xmldecl()
3418 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3419 XML_SetExternalEntityRefHandler(parser, in START_TEST()
3422 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3424 xml_failure(parser); in START_TEST()
3436 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3437 XML_SetExternalEntityRefHandler(parser, in START_TEST()
3440 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3442 xml_failure(parser); in START_TEST()
3448 external_entity_suspending_faulter(XML_Parser parser, in external_entity_suspending_faulter() argument
3455 ExtFaults *fault = (ExtFaults *)XML_GetUserData(parser); in external_entity_suspending_faulter()
3459 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_suspending_faulter()
3509 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3510 XML_SetExternalEntityRefHandler(parser, in START_TEST()
3512 XML_SetUserData(parser, fault); in START_TEST()
3516 XML_ParserReset(parser, NULL); in START_TEST()
3530 if (XML_SetEncoding(parser, NULL) != XML_STATUS_OK) in START_TEST()
3533 if (XML_SetEncoding(parser, XCS("utf-8")) != XML_STATUS_OK) in START_TEST()
3535 if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1), in START_TEST()
3537 xml_failure(parser); in START_TEST()
3539 if (XML_SetEncoding(parser, XCS("us-ascii")) != XML_STATUS_ERROR) in START_TEST()
3541 if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2), in START_TEST()
3543 xml_failure(parser); in START_TEST()
3545 if (XML_SetEncoding(parser, NULL) != XML_STATUS_OK) in START_TEST()
3570 XML_SetCharacterDataHandler(parser, cr_cdata_handler); in START_TEST()
3571 XML_SetUserData(parser, &found_cr); in START_TEST()
3573 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3578 XML_ParserReset(parser, NULL); in START_TEST()
3581 XML_SetDefaultHandler(parser, cr_cdata_handler); in START_TEST()
3582 XML_SetUserData(parser, &found_cr); in START_TEST()
3584 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3594 external_entity_cr_catcher(XML_Parser parser, in external_entity_cr_catcher() argument
3603 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_cr_catcher()
3615 external_entity_bad_cr_catcher(XML_Parser parser, in external_entity_bad_cr_catcher() argument
3624 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_bad_cr_catcher()
3646 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3647 XML_SetExternalEntityRefHandler(parser, external_entity_cr_catcher); in START_TEST()
3648 XML_SetUserData(parser, &found_cr); in START_TEST()
3650 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3652 xml_failure(parser); in START_TEST()
3655 XML_ParserReset(parser, NULL); in START_TEST()
3658 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3659 XML_SetExternalEntityRefHandler(parser, external_entity_bad_cr_catcher); in START_TEST()
3660 XML_SetUserData(parser, &found_cr); in START_TEST()
3662 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3664 xml_failure(parser); in START_TEST()
3687 XML_SetCharacterDataHandler(parser, rsqb_handler); in START_TEST()
3688 XML_SetUserData(parser, &found_rsqb); in START_TEST()
3690 if (_XML_Parse_SINGLE_BYTES(parser, text8, text8_len, in START_TEST()
3697 XML_ParserReset(parser, NULL); in START_TEST()
3698 XML_SetCharacterDataHandler(parser, rsqb_handler); in START_TEST()
3699 XML_SetUserData(parser, &found_rsqb); in START_TEST()
3701 if (_XML_Parse_SINGLE_BYTES(parser, text16, (int)sizeof(text16)-1, in START_TEST()
3708 XML_ParserReset(parser, NULL); in START_TEST()
3709 XML_SetDefaultHandler(parser, rsqb_handler); in START_TEST()
3710 XML_SetUserData(parser, &found_rsqb); in START_TEST()
3712 if (_XML_Parse_SINGLE_BYTES(parser, text16, (int)sizeof(text16)-1, in START_TEST()
3722 external_entity_rsqb_catcher(XML_Parser parser, in external_entity_rsqb_catcher() argument
3731 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_rsqb_catcher()
3753 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3754 XML_SetExternalEntityRefHandler(parser, external_entity_rsqb_catcher); in START_TEST()
3755 XML_SetUserData(parser, &found_rsqb); in START_TEST()
3757 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3759 xml_failure(parser); in START_TEST()
3767 external_entity_good_cdata_ascii(XML_Parser parser, in external_entity_good_cdata_ascii() argument
3780 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_good_cdata_ascii()
3803 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3804 XML_SetExternalEntityRefHandler(parser, in START_TEST()
3806 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3808 xml_failure(parser); in START_TEST()
3858 external_entity_param_checker(XML_Parser parser, in external_entity_param_checker() argument
3869 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_param_checker()
3875 xml_failure(parser); in external_entity_param_checker()
3878 handler_data = parser; in external_entity_param_checker()
3897 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3898 XML_SetXmlDeclHandler(parser, xml_decl_handler); in START_TEST()
3899 XML_SetExternalEntityRefHandler(parser, external_entity_param_checker); in START_TEST()
3900 XML_SetCommentHandler(parser, data_check_comment_handler); in START_TEST()
3901 XML_SetSkippedEntityHandler(parser, param_check_skip_handler); in START_TEST()
3902 XML_UseParserAsHandlerArg(parser); in START_TEST()
3903 XML_SetUserData(parser, (void *)1); in START_TEST()
3904 handler_data = parser; in START_TEST()
3905 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3907 xml_failure(parser); in START_TEST()
3911 if (XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_NEVER)) in START_TEST()
3913 if (_XML_Parse_SINGLE_BYTES(parser, epilog, (int)strlen(epilog), in START_TEST()
3915 xml_failure(parser); in START_TEST()
3948 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_ref_param_checker()
3966 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3967 XML_SetExternalEntityRefHandler(parser, in START_TEST()
3972 XML_SetExternalEntityRefHandlerArg(parser, (void *)text); in START_TEST()
3974 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3976 xml_failure(parser); in START_TEST()
3979 XML_ParserReset(parser, NULL); in START_TEST()
3980 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
3981 XML_SetExternalEntityRefHandler(parser, in START_TEST()
3983 XML_SetExternalEntityRefHandlerArg(parser, NULL); in START_TEST()
3984 handler_data = (void *)parser; in START_TEST()
3985 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
3987 xml_failure(parser); in START_TEST()
3997 if (XML_Parse(parser, NULL, 0, XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
3999 if (XML_Parse(parser, NULL, 0, XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
4001 if (XML_GetErrorCode(parser) != XML_ERROR_NO_ELEMENTS) in START_TEST()
4005 XML_ParserReset(parser, NULL); in START_TEST()
4006 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4008 xml_failure(parser); in START_TEST()
4009 if (XML_Parse(parser, NULL, 0, XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
4013 XML_ParserReset(parser, NULL); in START_TEST()
4014 if (_XML_Parse_SINGLE_BYTES(parser, partial, (int)strlen(partial), in START_TEST()
4016 xml_failure(parser); in START_TEST()
4017 if (XML_Parse(parser, NULL, 0, XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
4076 if (XML_GetBuffer(parser, -12) != NULL) in START_TEST()
4080 buffer = XML_GetBuffer(parser, 1536); in START_TEST()
4084 if (XML_ParseBuffer(parser, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
4085 xml_failure(parser); in START_TEST()
4086 if (XML_GetBuffer(parser, INT_MAX) != NULL) in START_TEST()
4102 if (XML_GetBuffer(parser, INT_MAX - (context_bytes + 1025)) != NULL) in START_TEST()
4106 if (XML_GetBuffer(parser, 1000) == NULL) in START_TEST()
4118 buffer = XML_GetBuffer(parser, 1536); in START_TEST()
4122 if (XML_ParseBuffer(parser, (int)strlen(text), XML_FALSE) == XML_STATUS_ERROR) in START_TEST()
4123 xml_failure(parser); in START_TEST()
4126 if (XML_GetBuffer(parser, 1024) == NULL) in START_TEST()
4136 if (XML_GetCurrentByteIndex(parser) != -1 || in START_TEST()
4137 XML_GetCurrentByteCount(parser) != 0) in START_TEST()
4139 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4141 xml_failure(parser); in START_TEST()
4143 if (XML_GetCurrentByteCount(parser) != 0) in START_TEST()
4145 if (XML_GetCurrentByteIndex(parser) != (XML_Index)strlen(text)) in START_TEST()
4157 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4160 if (XML_GetCurrentByteCount(parser) != 0) in START_TEST()
4162 if (XML_GetCurrentByteIndex(parser) != strlen(PRE_ERROR_STR)) in START_TEST()
4186 buffer = XML_GetInputContext(parser, &offset, &size); in byte_character_handler()
4195 if (XML_GetCurrentByteIndex(parser) != offset) in byte_character_handler()
4197 if (XML_GetCurrentByteCount(parser) != len) in byte_character_handler()
4215 if (XML_GetInputContext(parser, &offset, &size) != NULL) in START_TEST()
4221 XML_SetCharacterDataHandler(parser, byte_character_handler); in START_TEST()
4222 XML_SetUserData(parser, &data); in START_TEST()
4223 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_OK) in START_TEST()
4224 xml_failure(parser); in START_TEST()
4239 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
4244 XML_SetUserData(parser, &storage); in START_TEST()
4245 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4247 xml_failure(parser); in START_TEST()
4252 XML_ParserReset(parser, NULL); in START_TEST()
4266 external_entity_param(XML_Parser parser, in external_entity_param() argument
4285 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_param()
4316 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4317 XML_SetExternalEntityRefHandler(parser, external_entity_param); in START_TEST()
4338 XML_ParserReset(parser, NULL); in START_TEST()
4346 external_entity_load_ignore(XML_Parser parser, in external_entity_load_ignore() argument
4355 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_load_ignore()
4360 xml_failure(parser); in external_entity_load_ignore()
4376 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4377 XML_SetUserData(parser, &storage); in START_TEST()
4378 XML_SetExternalEntityRefHandler(parser, external_entity_load_ignore); in START_TEST()
4379 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
4380 XML_SetStartDoctypeDeclHandler(parser, dummy_start_doctype_handler); in START_TEST()
4381 XML_SetEndDoctypeDeclHandler(parser, dummy_end_doctype_handler); in START_TEST()
4382 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
4383 XML_SetStartElementHandler(parser, dummy_start_element); in START_TEST()
4384 XML_SetEndElementHandler(parser, dummy_end_element); in START_TEST()
4385 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4387 xml_failure(parser); in START_TEST()
4393 external_entity_load_ignore_utf16(XML_Parser parser, in external_entity_load_ignore_utf16() argument
4406 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_load_ignore_utf16()
4411 xml_failure(parser); in external_entity_load_ignore_utf16()
4430 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4431 XML_SetUserData(parser, &storage); in START_TEST()
4432 XML_SetExternalEntityRefHandler(parser, in START_TEST()
4434 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
4435 XML_SetStartDoctypeDeclHandler(parser, dummy_start_doctype_handler); in START_TEST()
4436 XML_SetEndDoctypeDeclHandler(parser, dummy_end_doctype_handler); in START_TEST()
4437 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
4438 XML_SetStartElementHandler(parser, dummy_start_element); in START_TEST()
4439 XML_SetEndElementHandler(parser, dummy_end_element); in START_TEST()
4440 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
4442 xml_failure(parser); in START_TEST()
4448 external_entity_load_ignore_utf16_be(XML_Parser parser, in external_entity_load_ignore_utf16_be() argument
4461 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_load_ignore_utf16_be()
4466 xml_failure(parser); in external_entity_load_ignore_utf16_be()
4485 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4486 XML_SetUserData(parser, &storage); in START_TEST()
4487 XML_SetExternalEntityRefHandler(parser, in START_TEST()
4489 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
4490 XML_SetStartDoctypeDeclHandler(parser, dummy_start_doctype_handler); in START_TEST()
4491 XML_SetEndDoctypeDeclHandler(parser, dummy_end_doctype_handler); in START_TEST()
4492 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
4493 XML_SetStartElementHandler(parser, dummy_start_element); in START_TEST()
4494 XML_SetEndElementHandler(parser, dummy_end_element); in START_TEST()
4495 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
4497 xml_failure(parser); in START_TEST()
4533 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4534 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
4535 XML_SetUserData(parser, fault); in START_TEST()
4538 XML_ParserReset(parser, NULL); in START_TEST()
4545 external_entity_valuer(XML_Parser parser, in external_entity_valuer() argument
4560 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_valuer()
4569 ExtFaults *fault = (ExtFaults *)XML_GetUserData(parser); in external_entity_valuer()
4673 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4674 XML_SetExternalEntityRefHandler(parser, external_entity_valuer); in START_TEST()
4675 XML_SetUserData(parser, &data_004_2[i]); in START_TEST()
4676 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4678 xml_failure(parser); in START_TEST()
4679 XML_ParserReset(parser, NULL); in START_TEST()
4686 external_entity_not_standalone(XML_Parser parser, in external_entity_not_standalone() argument
4701 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_not_standalone()
4732 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4733 XML_SetExternalEntityRefHandler(parser, external_entity_not_standalone); in START_TEST()
4740 external_entity_value_aborter(XML_Parser parser, in external_entity_value_aborter() argument
4757 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_value_aborter()
4785 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4786 XML_SetExternalEntityRefHandler(parser, in START_TEST()
4789 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4791 xml_failure(parser); in START_TEST()
4803 XML_SetDoctypeDeclHandler(parser, in START_TEST()
4826 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
4827 XML_SetUserData(parser, &dtd_data); in START_TEST()
4828 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4830 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
4862 XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); in START_TEST()
4864 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4866 xml_failure(parser); in START_TEST()
4882 XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); in START_TEST()
4883 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4885 xml_failure(parser); in START_TEST()
4914 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
4915 XML_SetStartElementHandler(parser, record_element_start_handler); in START_TEST()
4916 XML_SetUserData(parser, &storage); in START_TEST()
4918 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4920 xml_failure(parser); in START_TEST()
4942 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
4944 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4946 xml_failure(parser); in START_TEST()
4953 external_entity_public(XML_Parser parser, in external_entity_public() argument
4959 const char *text1 = (const char *)XML_GetUserData(parser); in external_entity_public()
4965 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_public()
4994 XML_SetUserData(parser, dtd_data); in START_TEST()
4995 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
4996 XML_SetExternalEntityRefHandler(parser, external_entity_public); in START_TEST()
4997 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
4999 xml_failure(parser); in START_TEST()
5015 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
5016 XML_SetUserData(parser, &dtd_data); in START_TEST()
5017 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5018 XML_SetSkippedEntityHandler(parser, dummy_skip_handler); in START_TEST()
5020 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5022 xml_failure(parser); in START_TEST()
5044 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
5045 XML_SetUserData(parser, &dtd_data); in START_TEST()
5046 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5055 external_entity_devaluer(XML_Parser parser, in external_entity_devaluer() argument
5066 intptr_t clear_handler = (intptr_t)XML_GetUserData(parser); in external_entity_devaluer()
5072 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_devaluer()
5091 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5092 XML_SetExternalEntityRefHandler(parser, external_entity_devaluer); in START_TEST()
5093 XML_SetUserData(parser, (void *)(intptr_t)XML_FALSE); in START_TEST()
5094 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5096 xml_failure(parser); in START_TEST()
5101 XML_ParserReset(parser, NULL); in START_TEST()
5102 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5103 XML_SetExternalEntityRefHandler(parser, external_entity_devaluer); in START_TEST()
5104 XML_SetUserData(parser, (void *)(intptr_t)XML_TRUE); in START_TEST()
5105 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5107 xml_failure(parser); in START_TEST()
5118 XML_StopParser(parser, resumable); in aborting_xdecl_handler()
5119 XML_SetXmlDeclHandler(parser, NULL); in aborting_xdecl_handler()
5127 XML_SetXmlDeclHandler(parser, aborting_xdecl_handler); in START_TEST()
5129 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5131 xml_failure(parser); in START_TEST()
5132 if (XML_GetErrorCode(parser) != XML_ERROR_NONE) in START_TEST()
5133 xml_failure(parser); in START_TEST()
5135 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
5137 if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED) in START_TEST()
5153 XML_StopParser(parser, resumable); in selective_aborting_default_handler()
5154 XML_SetDefaultHandler(parser, NULL); in selective_aborting_default_handler()
5163 XML_SetDefaultHandler(parser, selective_aborting_default_handler); in START_TEST()
5164 XML_SetUserData(parser, match); in START_TEST()
5166 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5169 if (XML_GetErrorCode(parser) != XML_ERROR_ABORTED) in START_TEST()
5170 xml_failure(parser); in START_TEST()
5180 XML_SetDefaultHandler(parser, selective_aborting_default_handler); in START_TEST()
5181 XML_SetUserData(parser, match); in START_TEST()
5193 XML_SetDefaultHandler(parser, selective_aborting_default_handler); in START_TEST()
5194 XML_SetUserData(parser, match); in START_TEST()
5196 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5198 xml_failure(parser); in START_TEST()
5214 XML_SetEndElementHandler(parser, suspending_end_handler); in START_TEST()
5215 XML_SetUserData(parser, parser); in START_TEST()
5216 rc = _XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5219 xml_failure(parser); in START_TEST()
5222 rc = XML_ResumeParser(parser); in START_TEST()
5224 xml_failure(parser); in START_TEST()
5244 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5246 xml_failure(parser); in START_TEST()
5248 if (XML_ParseBuffer(parser, 0, XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
5250 if (XML_GetErrorCode(parser) != XML_ERROR_PARTIAL_CHAR) in START_TEST()
5251 xml_failure(parser); in START_TEST()
5276 XML_SetHashSalt(parser, COLLIDING_HASH_SALT); in START_TEST()
5277 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5279 xml_failure(parser); in START_TEST()
5291 XML_StopParser(parser, XML_TRUE); in start_element_suspender()
5293 XML_StopParser(parser, XML_FALSE); in start_element_suspender()
5308 XML_SetStartElementHandler(parser, start_element_suspender); in START_TEST()
5309 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
5310 XML_SetUserData(parser, &storage); in START_TEST()
5311 if (XML_Parse(parser, text, (int)strlen(text), in START_TEST()
5313 xml_failure(parser); in START_TEST()
5315 if (XML_ResumeParser(parser) != XML_STATUS_SUSPENDED) in START_TEST()
5316 xml_failure(parser); in START_TEST()
5318 if (XML_ResumeParser(parser) != XML_STATUS_OK) in START_TEST()
5319 xml_failure(parser); in START_TEST()
5333 XML_SetStartElementHandler(parser, start_element_suspender); in START_TEST()
5334 if (XML_Parse(parser, text, (int)strlen(text), in START_TEST()
5336 xml_failure(parser); in START_TEST()
5337 if (XML_ResumeParser(parser) != XML_STATUS_ERROR) in START_TEST()
5339 if (XML_GetErrorCode(parser) != XML_ERROR_TAG_MISMATCH) in START_TEST()
5340 xml_failure(parser); in START_TEST()
5350 XML_StopParser(parser, XML_TRUE); in element_decl_suspender()
5351 XML_FreeContentModel(parser, model); in element_decl_suspender()
5366 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5367 XML_SetElementDeclHandler(parser, element_decl_suspender); in START_TEST()
5368 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
5369 XML_SetUserData(parser, &storage); in START_TEST()
5370 if (XML_Parse(parser, text, (int)strlen(text), in START_TEST()
5372 xml_failure(parser); in START_TEST()
5374 if (XML_ResumeParser(parser) != XML_STATUS_OK) in START_TEST()
5375 xml_failure(parser); in START_TEST()
5385 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
5387 if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) in START_TEST()
5388 xml_failure(parser); in START_TEST()
5389 if (XML_Parse(parser, NULL, 0, XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
5391 if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) in START_TEST()
5392 xml_failure(parser); in START_TEST()
5423 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5425 xml_failure(parser); in START_TEST()
5444 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5445 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5447 xml_failure(parser); in START_TEST()
5464 XML_SetUserData(parser, &test_data); in START_TEST()
5465 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5466 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
5467 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5469 xml_failure(parser); in START_TEST()
5480 external_entity_oneshot_loader(XML_Parser parser, in external_entity_oneshot_loader() argument
5486 ExtHdlrData *test_data = (ExtHdlrData *)XML_GetUserData(parser); in external_entity_oneshot_loader()
5489 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_oneshot_loader()
5517 XML_SetUserData(parser, &test_data); in START_TEST()
5518 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5519 XML_SetExternalEntityRefHandler(parser, external_entity_oneshot_loader); in START_TEST()
5520 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5522 xml_failure(parser); in START_TEST()
5538 XML_SetUserData(parser, &test_data); in START_TEST()
5539 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5540 XML_SetExternalEntityRefHandler(parser, external_entity_oneshot_loader); in START_TEST()
5541 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5543 xml_failure(parser); in START_TEST()
5565 XML_SetUserData(parser, &test_data); in START_TEST()
5566 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
5567 XML_SetExternalEntityRefHandler(parser, external_entity_loader); in START_TEST()
5568 XML_SetEntityDeclHandler(parser, param_entity_match_handler); in START_TEST()
5572 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5574 xml_failure(parser); in START_TEST()
5625 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
5628 if (XML_GetErrorCode(parser) != XML_ERROR_UNDEFINED_ENTITY) in START_TEST()
5629 xml_failure(parser); in START_TEST()
5655 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
5656 XML_SetUserData(parser, &storage); in START_TEST()
5657 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5659 xml_failure(parser); in START_TEST()
5673 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
5674 XML_SetUserData(parser, &storage); in START_TEST()
5675 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5677 xml_failure(parser); in START_TEST()
5703 XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters); in START_TEST()
5704 XML_SetUserData(parser, &storage); in START_TEST()
5705 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5707 xml_failure(parser); in START_TEST()
5719 XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters); in START_TEST()
5720 XML_SetUserData(parser, &storage); in START_TEST()
5721 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5723 xml_failure(parser); in START_TEST()
5735 XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters); in START_TEST()
5736 XML_SetUserData(parser, &storage); in START_TEST()
5737 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
5739 xml_failure(parser); in START_TEST()
5762 XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters); in START_TEST()
5763 XML_SetUserData(parser, &storage); in START_TEST()
5764 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
5766 xml_failure(parser); in START_TEST()
5789 XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters); in START_TEST()
5790 XML_SetUserData(parser, &storage); in START_TEST()
5791 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
5793 xml_failure(parser); in START_TEST()
5819 XML_SetCommentHandler(parser, accumulate_comment); in START_TEST()
5820 XML_SetUserData(parser, &storage); in START_TEST()
5821 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
5823 xml_failure(parser); in START_TEST()
5839 XML_SetCommentHandler(parser, accumulate_comment); in START_TEST()
5840 XML_SetUserData(parser, &storage); in START_TEST()
5841 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
5843 xml_failure(parser); in START_TEST()
5924 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
5942 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
5961 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
5973 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
5986 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6006 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6007 XML_SetStartElementHandler(parser, record_element_start_handler); in START_TEST()
6008 XML_SetUserData(parser, &storage); in START_TEST()
6009 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6011 xml_failure(parser); in START_TEST()
6030 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6031 XML_SetStartElementHandler(parser, record_element_start_handler); in START_TEST()
6032 XML_SetUserData(parser, &storage); in START_TEST()
6033 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6035 xml_failure(parser); in START_TEST()
6046 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6058 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6069 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6081 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6093 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6105 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6117 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6129 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6152 external_entity_loader2(XML_Parser parser, in external_entity_loader2() argument
6158 ExtTest2 *test_data = (ExtTest2 *)XML_GetUserData(parser); in external_entity_loader2()
6161 extparser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_loader2()
6224 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6225 XML_SetUserData(parser, &test_data); in START_TEST()
6226 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6227 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6229 xml_failure(parser); in START_TEST()
6263 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6264 XML_SetUserData(parser, &test_data); in START_TEST()
6265 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6266 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6268 xml_failure(parser); in START_TEST()
6307 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6308 XML_SetUserData(parser, &test_data); in START_TEST()
6309 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6310 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
6311 xml_failure(parser); in START_TEST()
6345 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6346 XML_SetUserData(parser, &test_data); in START_TEST()
6347 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6348 if (XML_Parse(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
6349 xml_failure(parser); in START_TEST()
6382 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6383 XML_SetUserData(parser, &test_data); in START_TEST()
6384 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6385 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6387 xml_failure(parser); in START_TEST()
6420 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6421 XML_SetUserData(parser, &test_data); in START_TEST()
6422 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6423 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6425 xml_failure(parser); in START_TEST()
6446 external_entity_faulter2(XML_Parser parser, in external_entity_faulter2() argument
6452 ExtFaults2 *test_data = (ExtFaults2 *)XML_GetUserData(parser); in external_entity_faulter2()
6455 extparser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_faulter2()
6489 XML_SetExternalEntityRefHandler(parser, external_entity_faulter2); in START_TEST()
6490 XML_SetUserData(parser, &test_data); in START_TEST()
6520 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6521 XML_SetUserData(parser, &test_data); in START_TEST()
6522 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6523 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6525 xml_failure(parser); in START_TEST()
6576 XML_SetElementHandler(parser, record_element_start_handler, in START_TEST()
6578 XML_SetUserData(parser, &storage); in START_TEST()
6579 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
6581 xml_failure(parser); in START_TEST()
6598 XML_SetStartElementHandler(parser, accumulate_attribute); in START_TEST()
6599 XML_SetUserData(parser, &storage); in START_TEST()
6600 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6602 xml_failure(parser); in START_TEST()
6620 XML_SetStartElementHandler(parser, accumulate_attribute); in START_TEST()
6621 XML_SetUserData(parser, &storage); in START_TEST()
6622 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6624 xml_failure(parser); in START_TEST()
6687 XML_SetUserData(parser, &storage); in START_TEST()
6688 XML_SetEntityDeclHandler(parser, accumulate_entity_decl); in START_TEST()
6689 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6691 xml_failure(parser); in START_TEST()
6729 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6732 if (XML_GetErrorCode(parser) != XML_ERROR_SYNTAX) in START_TEST()
6733 xml_failure(parser); in START_TEST()
6746 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6764 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6767 if (XML_GetErrorCode(parser) != XML_ERROR_SYNTAX) in START_TEST()
6768 xml_failure(parser); in START_TEST()
6818 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
6819 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
6820 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
6821 XML_SetUserData(parser, &fault); in START_TEST()
6841 XML_SetUserData(parser, &storage); in START_TEST()
6842 XML_SetStartElementHandler(parser, accumulate_attribute); in START_TEST()
6843 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6845 xml_failure(parser); in START_TEST()
6864 XML_SetUserData(parser, &storage); in START_TEST()
6865 XML_SetStartElementHandler(parser, accumulate_attribute); in START_TEST()
6866 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6868 xml_failure(parser); in START_TEST()
6900 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
6901 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6902 XML_SetUserData(parser, &test_data); in START_TEST()
6903 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6904 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6906 xml_failure(parser); in START_TEST()
6938 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
6939 XML_SetExternalEntityRefHandler(parser, external_entity_loader2); in START_TEST()
6940 XML_SetUserData(parser, &test_data); in START_TEST()
6941 XML_SetCharacterDataHandler(parser, ext2_accumulate_characters); in START_TEST()
6942 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
6944 xml_failure(parser); in START_TEST()
7091 XML_SetUserData(parser, &test_data); in START_TEST()
7092 XML_SetDefaultHandler(parser, checking_default_handler); in START_TEST()
7093 XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); in START_TEST()
7094 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7096 xml_failure(parser); in START_TEST()
7107 XML_SetStartElementHandler(parser, start_element_suspender); in START_TEST()
7108 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7121 parser = XML_ParserCreateNS(NULL, XCS(' ')); in namespace_setup()
7122 if (parser == NULL) in namespace_setup()
7184 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
7185 XML_SetUserData(parser, (void *)elemstr); in START_TEST()
7186 XML_SetElementHandler(parser, triplet_start_checker, in START_TEST()
7188 XML_SetNamespaceDeclHandler(parser, in START_TEST()
7194 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7196 xml_failure(parser); in START_TEST()
7200 XML_SetReturnNSTriplet(parser, XML_FALSE); in START_TEST()
7201 if (_XML_Parse_SINGLE_BYTES(parser, epilog, (int)strlen(epilog), in START_TEST()
7203 xml_failure(parser); in START_TEST()
7241 XML_SetUserData(parser, &storage); in run_ns_tagname_overwrite_test()
7242 XML_SetElementHandler(parser, in run_ns_tagname_overwrite_test()
7244 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in run_ns_tagname_overwrite_test()
7245 xml_failure(parser); in run_ns_tagname_overwrite_test()
7287 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
7318 XML_SetStartElementHandler(parser, start_element_fail); in START_TEST()
7319 XML_SetStartNamespaceDeclHandler(parser, start_ns_clearing_start_element); in START_TEST()
7320 XML_SetEndNamespaceDeclHandler(parser, dummy_end_namespace_decl_handler); in START_TEST()
7321 XML_UseParserAsHandlerArg(parser); in START_TEST()
7322 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
7323 xml_failure(parser); in START_TEST()
7329 external_entity_handler(XML_Parser parser, in external_entity_handler() argument
7335 intptr_t callno = 1 + (intptr_t)XML_GetUserData(parser); in external_entity_handler()
7347 XML_SetUserData(parser, (void *) callno); in external_entity_handler()
7348 p2 = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_handler()
7368 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
7369 XML_SetExternalEntityRefHandler(parser, external_entity_handler); in START_TEST()
7371 XML_SetStartElementHandler(parser, dummy_start_element); in START_TEST()
7372 XML_SetUserData(parser, NULL); in START_TEST()
7373 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
7374 xml_failure(parser); in START_TEST()
7439 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
7440 XML_SetUserData(parser, (void *)elemstr); in START_TEST()
7441 XML_SetEndElementHandler(parser, triplet_end_checker); in START_TEST()
7442 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
7443 xml_failure(parser); in START_TEST()
7458 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7461 if (XML_GetErrorCode(parser) != XML_ERROR_UNBOUND_PREFIX) in START_TEST()
7462 xml_failure(parser); in START_TEST()
7473 XML_SetStartNamespaceDeclHandler(parser, in START_TEST()
7475 XML_SetEndNamespaceDeclHandler(parser, in START_TEST()
7477 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
7478 xml_failure(parser); in START_TEST()
7516 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7518 xml_failure(parser); in START_TEST()
7550 XML_GetParsingStatus(parser, &status); in START_TEST()
7554 XML_GetParsingStatus(parser, &status); in START_TEST()
7557 XML_ParserReset(parser, NULL); in START_TEST()
7558 XML_GetParsingStatus(parser, &status); in START_TEST()
7578 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
7579 XML_SetUserData(parser, (void *)elemstr); in START_TEST()
7580 XML_SetElementHandler(parser, in START_TEST()
7583 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7585 xml_failure(parser); in START_TEST()
7597 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7599 xml_failure(parser); in START_TEST()
7614 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
7616 xml_failure(parser); in START_TEST()
7631 XML_ParserReset(parser, NULL); in START_TEST()
7632 if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2), in START_TEST()
7634 xml_failure(parser); in START_TEST()
7651 XML_ParserReset(parser, NULL); in START_TEST()
7654 XML_ParserReset(parser, NULL); in START_TEST()
7742 if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1), in START_TEST()
7744 xml_failure(parser); in START_TEST()
7745 if (_XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2), in START_TEST()
7747 xml_failure(parser); in START_TEST()
7758 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
7818 XML_SetStartElementHandler(parser, accumulate_attribute); in START_TEST()
7819 XML_SetUserData(parser, &storage); in START_TEST()
7820 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
7822 xml_failure(parser); in START_TEST()
7842 XML_SetStartElementHandler(parser, start_element_event_handler); in START_TEST()
7843 XML_SetUserData(parser, &storage); in START_TEST()
7844 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
7846 xml_failure(parser); in START_TEST()
7873 XML_SetUserData(parser, &storage); in START_TEST()
7874 XML_SetStartElementHandler(parser, start_element_event_handler); in START_TEST()
7875 XML_SetUnknownEncodingHandler(parser, MiscEncodingHandler, NULL); in START_TEST()
7876 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
7878 xml_failure(parser); in START_TEST()
7943 parser = XML_ParserCreate_MM(NULL, &memsuite, NULL); in START_TEST()
7944 if (parser != NULL) in START_TEST()
7964 parser = XML_ParserCreate_MM(XCS("us-ascii"), &memsuite, NULL); in START_TEST()
7965 if (parser != NULL) in START_TEST()
8083 parser = NULL; in START_TEST()
8117 parser = XML_ParserCreate_MM(XCS("UTF-8"), &memsuite, XCS("\n")); in START_TEST()
8120 XML_ParserFree(parser); in START_TEST()
8122 parser = NULL; in START_TEST()
8140 parser = XML_ParserCreate(XCS("UTF-16LE")); in START_TEST()
8141 if (parser == NULL) in START_TEST()
8145 XML_SetUserData(parser, &storage); in START_TEST()
8146 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
8147 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)sizeof(text)-1, in START_TEST()
8149 xml_failure(parser); in START_TEST()
8167 parser = XML_ParserCreate_MM(NULL, &memsuite, NULL); in alloc_setup()
8168 if (parser == NULL) in alloc_setup()
8190 XML_SetXmlDeclHandler(parser, dummy_xdecl_handler); in START_TEST()
8191 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8255 XML_SetXmlDeclHandler(parser, dummy_xdecl_handler); in START_TEST()
8256 XML_SetUnknownEncodingHandler(parser, long_encoding_handler, NULL); in START_TEST()
8257 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8285 XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); in START_TEST()
8286 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8313 XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); in START_TEST()
8314 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8355 XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); in START_TEST()
8356 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8381 XML_SetCommentHandler(parser, dummy_comment_handler); in START_TEST()
8382 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8409 XML_SetCommentHandler(parser, dummy_comment_handler); in START_TEST()
8410 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8425 external_entity_duff_loader(XML_Parser parser, in external_entity_duff_loader() argument
8439 new_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_duff_loader()
8470 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
8471 XML_SetUserData(parser, foo_text); in START_TEST()
8472 XML_SetExternalEntityRefHandler(parser, in START_TEST()
8474 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) { in START_TEST()
8493 XML_SetParamEntityParsing(parser, in START_TEST()
8495 XML_SetUserData(parser, foo_text); in START_TEST()
8496 XML_SetExternalEntityRefHandler(parser, in START_TEST()
8499 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
8514 external_entity_dbl_handler(XML_Parser parser, in external_entity_dbl_handler() argument
8520 intptr_t callno = (intptr_t)XML_GetUserData(parser); in external_entity_dbl_handler()
8532 new_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_dbl_handler()
8538 XML_SetUserData(parser, (void *)(intptr_t)(10000 - allocation_count)); in external_entity_dbl_handler()
8545 new_parser = XML_ExternalEntityParserCreate(parser, in external_entity_dbl_handler()
8585 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
8586 XML_SetExternalEntityRefHandler(parser, in START_TEST()
8588 XML_SetUserData(parser, NULL); in START_TEST()
8589 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) == XML_STATUS_ERROR) in START_TEST()
8590 xml_failure(parser); in START_TEST()
8596 external_entity_dbl_handler_2(XML_Parser parser, in external_entity_dbl_handler_2() argument
8602 intptr_t callno = (intptr_t)XML_GetUserData(parser); in external_entity_dbl_handler_2()
8612 XML_SetUserData(parser, (void *)(intptr_t)1); in external_entity_dbl_handler_2()
8613 new_parser = XML_ExternalEntityParserCreate(parser, in external_entity_dbl_handler_2()
8624 new_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_dbl_handler_2()
8652 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
8653 XML_SetExternalEntityRefHandler(parser, in START_TEST()
8655 XML_SetUserData(parser, NULL); in START_TEST()
8657 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8674 external_entity_alloc_set_encoding(XML_Parser parser, in external_entity_alloc_set_encoding() argument
8687 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_alloc_set_encoding()
8713 XML_SetExternalEntityRefHandler(parser, in START_TEST()
8716 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8763 XML_SetUnknownEncodingHandler(parser, in START_TEST()
8766 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
8804 XML_SetDefaultHandler(parser, accumulate_characters); in START_TEST()
8805 XML_SetDoctypeDeclHandler(parser, in START_TEST()
8808 XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); in START_TEST()
8809 XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); in START_TEST()
8810 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
8811 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
8812 XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); in START_TEST()
8813 XML_SetCommentHandler(parser, dummy_comment_handler); in START_TEST()
8814 XML_SetCdataSectionHandler(parser, in START_TEST()
8818 parser, in START_TEST()
8821 XML_SetUserData(parser, &storage); in START_TEST()
8822 XML_SetCharacterDataHandler(parser, accumulate_characters); in START_TEST()
8823 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
8858 if (XML_SetEncoding(parser, XCS("us-ascii")) == XML_STATUS_OK) in START_TEST()
8877 if (XML_SetBase(parser, new_base) == XML_STATUS_OK) in START_TEST()
8898 buffer = XML_GetBuffer(parser, 1536); in START_TEST()
8902 if (XML_ParseBuffer(parser, (int)strlen(text), in START_TEST()
8919 external_entity_reallocator(XML_Parser parser, in external_entity_reallocator() argument
8930 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_reallocator()
8934 reallocation_count = (intptr_t)XML_GetUserData(parser); in external_entity_reallocator()
8956 XML_SetExternalEntityRefHandler(parser, in START_TEST()
8958 XML_SetUserData(parser, (void *)(intptr_t)i); in START_TEST()
8959 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9006 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9055 XML_SetUserData(parser, dtd_text); in START_TEST()
9056 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
9057 XML_SetExternalEntityRefHandler(parser, external_entity_public); in START_TEST()
9059 XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); in START_TEST()
9060 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9123 XML_SetUserData(parser, dtd_text); in START_TEST()
9124 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
9125 XML_SetExternalEntityRefHandler(parser, external_entity_public); in START_TEST()
9126 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9170 XML_SetDoctypeDeclHandler(parser, in START_TEST()
9173 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9219 XML_SetDoctypeDeclHandler(parser, in START_TEST()
9222 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9237 external_entity_alloc(XML_Parser parser, in external_entity_alloc() argument
9243 const char *text = (const char *)XML_GetUserData(parser); in external_entity_alloc()
9247 ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); in external_entity_alloc()
9268 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
9269 XML_SetUserData(parser, &text2); in START_TEST()
9270 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
9271 if (XML_UseForeignDTD(parser, XML_TRUE) != XML_ERROR_NONE) in START_TEST()
9273 if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1), in START_TEST()
9303 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
9304 XML_SetUserData(parser, dtd_text); in START_TEST()
9305 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
9307 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
9308 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9361 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
9362 XML_SetUserData(parser, dtd_text); in START_TEST()
9363 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
9365 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
9366 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9416 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
9417 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9467 XML_SetAttlistDeclHandler(parser, dummy_attlist_decl_handler); in START_TEST()
9468 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9532 XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); in START_TEST()
9533 XML_SetEntityDeclHandler(parser, dummy_entity_decl_handler); in START_TEST()
9534 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9584 XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); in START_TEST()
9585 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9634 XML_SetNotationDeclHandler(parser, dummy_notation_decl_handler); in START_TEST()
9635 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9670 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
9671 XML_SetStartElementHandler(parser, record_element_start_handler); in START_TEST()
9672 XML_SetUserData(parser, &storage); in START_TEST()
9674 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9711 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
9712 XML_SetStartElementHandler(parser, record_element_start_handler); in START_TEST()
9713 XML_SetUserData(parser, &storage); in START_TEST()
9715 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9753 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
9755 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9793 XML_SetElementDeclHandler(parser, dummy_element_decl_handler); in START_TEST()
9795 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9821 XML_SetProcessingInstructionHandler(parser, dummy_pi_handler); in START_TEST()
9823 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9849 XML_SetCommentHandler(parser, dummy_comment_handler); in START_TEST()
9851 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9895 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9917 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9939 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
9985 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10030 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10083 XML_SetUserData(parser, &test_data); in START_TEST()
10084 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
10085 XML_SetExternalEntityRefHandler(parser, external_entity_faulter); in START_TEST()
10122 XML_SetUserData(parser, dtd_text); in START_TEST()
10123 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
10124 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
10125 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10170 XML_SetUserData(parser, dtd_text); in START_TEST()
10171 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
10172 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
10173 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10209 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10250 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10295 XML_SetUserData(parser, entity_text); in START_TEST()
10296 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
10297 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
10298 if (XML_SetBase(parser, base) == XML_STATUS_ERROR) { in START_TEST()
10299 XML_ParserReset(parser, NULL); in START_TEST()
10302 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10347 XML_SetUserData(parser, entity_text); in START_TEST()
10348 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
10349 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
10350 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10396 XML_SetUserData(parser, entity_text); in START_TEST()
10397 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
10398 XML_SetExternalEntityRefHandler(parser, external_entity_alloc); in START_TEST()
10399 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10468 XML_SetUserData(parser, options); in START_TEST()
10469 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
10470 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in START_TEST()
10471 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10500 parser = XML_ParserCreate_MM(NULL, &memsuite, ns_sep); in nsalloc_setup()
10501 if (parser == NULL) in nsalloc_setup()
10527 XML_SetDefaultHandler(parser, dummy_default_handler); in START_TEST()
10528 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10555 if (XML_ParseBuffer(parser, 0, XML_FALSE) != XML_STATUS_ERROR) in START_TEST()
10557 if (XML_GetErrorCode(parser) != XML_ERROR_NO_MEMORY) in START_TEST()
10562 if (XML_ParseBuffer(parser, 0, XML_FALSE) != XML_STATUS_OK) in START_TEST()
10563 xml_failure(parser); in START_TEST()
10566 if (XML_ResumeParser(parser) != XML_STATUS_ERROR) in START_TEST()
10568 if (XML_GetErrorCode(parser) != XML_ERROR_NOT_SUSPENDED) in START_TEST()
10569 xml_failure(parser); in START_TEST()
10572 XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); in START_TEST()
10574 buffer = XML_GetBuffer(parser, (int)strlen(text)); in START_TEST()
10578 if (XML_ParseBuffer(parser, (int)strlen(text), in START_TEST()
10580 xml_failure(parser); in START_TEST()
10581 if (XML_GetErrorCode(parser) != XML_ERROR_NONE) in START_TEST()
10582 xml_failure(parser); in START_TEST()
10583 if (XML_ParseBuffer(parser, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
10585 if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED) in START_TEST()
10586 xml_failure(parser); in START_TEST()
10587 if (XML_GetBuffer(parser, (int)strlen(text)) != NULL) in START_TEST()
10591 XML_SetCharacterDataHandler(parser, NULL); in START_TEST()
10592 if (XML_ResumeParser(parser) != XML_STATUS_OK) in START_TEST()
10593 xml_failure(parser); in START_TEST()
10594 if (XML_ParseBuffer(parser, (int)strlen(text), XML_TRUE) != XML_STATUS_ERROR) in START_TEST()
10596 if (XML_GetErrorCode(parser) != XML_ERROR_FINISHED) in START_TEST()
10597 xml_failure(parser); in START_TEST()
10598 if (XML_GetBuffer(parser, (int)strlen(text)) != NULL) in START_TEST()
10666 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10727 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10771 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10853 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
10854 XML_SetUserData(parser, (void *)elemstr); in START_TEST()
10855 XML_SetElementHandler(parser, in START_TEST()
10858 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10884 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10916 XML_SetReturnNSTriplet(parser, XML_TRUE); in START_TEST()
10917 XML_SetUserData(parser, (void *)elemstr); in START_TEST()
10918 XML_SetElementHandler(parser, in START_TEST()
10921 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
10959 if (_XML_Parse_SINGLE_BYTES(parser, first, (int)strlen(first), in START_TEST()
10961 xml_failure(parser); in START_TEST()
10965 XML_ParserReset(parser, NULL); in START_TEST()
10967 if (_XML_Parse_SINGLE_BYTES(parser, second, (int)strlen(second), in START_TEST()
11041 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
11118 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
11230 if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1), in START_TEST()
11232 _XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2), in START_TEST()
11306 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
11358 XML_SetUserData(parser, options); in START_TEST()
11359 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
11360 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in START_TEST()
11361 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
11392 XML_SetUserData(parser, options); in context_realloc_test()
11393 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in context_realloc_test()
11394 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in context_realloc_test()
11395 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in context_realloc_test()
11686 XML_SetUserData(parser, options); in START_TEST()
11687 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
11688 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in START_TEST()
11689 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
11794 XML_SetUserData(parser, options); in START_TEST()
11795 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
11796 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in START_TEST()
11797 if (_XML_Parse_SINGLE_BYTES(parser, text1, (int)strlen(text1), in START_TEST()
11799 _XML_Parse_SINGLE_BYTES(parser, text2, (int)strlen(text2), in START_TEST()
11848 XML_SetUserData(parser, options); in START_TEST()
11849 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
11850 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in START_TEST()
11851 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
11919 XML_SetUserData(parser, options); in START_TEST()
11920 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
11921 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in START_TEST()
11922 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()
11960 XML_SetUserData(parser, options); in START_TEST()
11961 XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); in START_TEST()
11962 XML_SetExternalEntityRefHandler(parser, external_entity_optioner); in START_TEST()
11963 if (_XML_Parse_SINGLE_BYTES(parser, text, (int)strlen(text), in START_TEST()