mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-17 10:35:41 +00:00
Test unannounced UTF-16, no BOM, leading space to hide '<'
This commit is contained in:
parent
431a7b30bc
commit
0940aa04ee
1 changed files with 11 additions and 0 deletions
|
@ -490,6 +490,16 @@ START_TEST(test_bom_utf16_le)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
/* Parse whole buffer at once to exercise a different code path */
|
||||
START_TEST(test_nobom_utf16_le)
|
||||
{
|
||||
char text[] = " \0<\0e\0/\0>\0";
|
||||
|
||||
if (XML_Parse(parser, text, sizeof(text)-1, XML_TRUE) == XML_STATUS_ERROR)
|
||||
xml_failure(parser);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
static void XMLCALL
|
||||
accumulate_characters(void *userData, const XML_Char *s, int len)
|
||||
{
|
||||
|
@ -11045,6 +11055,7 @@ make_suite(void)
|
|||
tcase_add_test(tc_basic, test_bom_utf8);
|
||||
tcase_add_test(tc_basic, test_bom_utf16_be);
|
||||
tcase_add_test(tc_basic, test_bom_utf16_le);
|
||||
tcase_add_test(tc_basic, test_nobom_utf16_le);
|
||||
tcase_add_test(tc_basic, test_illegal_utf8);
|
||||
tcase_add_test(tc_basic, test_utf8_auto_align);
|
||||
tcase_add_test(tc_basic, test_utf16);
|
||||
|
|
Loading…
Add table
Reference in a new issue