mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-17 10:35:41 +00:00
Test PI with a target of "xnl"
This commit is contained in:
parent
1c6675e302
commit
9b1a9dd790
1 changed files with 17 additions and 0 deletions
|
@ -5292,6 +5292,22 @@ START_TEST(test_pi_yml)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(test_pi_xnl)
|
||||
{
|
||||
const char *text = "<?xnl nothing like data?><doc/>";
|
||||
const XML_Char *expected = "xnl: nothing like data\n";
|
||||
CharData storage;
|
||||
|
||||
CharData_Init(&storage);
|
||||
XML_SetProcessingInstructionHandler(parser, accumulate_pi_characters);
|
||||
XML_SetUserData(parser, &storage);
|
||||
if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
|
||||
XML_TRUE) == XML_STATUS_ERROR)
|
||||
xml_failure(parser);
|
||||
CharData_CheckXMLChars(&storage, expected);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
/* Test that the unknown encoding handler with map entries that expect
|
||||
* conversion but no conversion function is faulted
|
||||
*/
|
||||
|
@ -11226,6 +11242,7 @@ make_suite(void)
|
|||
tcase_add_test(tc_basic, test_pi_handled_in_default);
|
||||
tcase_add_test(tc_basic, test_comment_handled_in_default);
|
||||
tcase_add_test(tc_basic, test_pi_yml);
|
||||
tcase_add_test(tc_basic, test_pi_xnl);
|
||||
tcase_add_test(tc_basic, test_missing_encoding_conversion_fn);
|
||||
tcase_add_test(tc_basic, test_failing_encoding_conversion_fn);
|
||||
tcase_add_test(tc_basic, test_unknown_encoding_success);
|
||||
|
|
Loading…
Add table
Reference in a new issue