[Expat-checkins] CVS: expat/tests runtests.c,1.11,1.12
Fred L. Drake
fdrake@users.sourceforge.net
Sat Apr 20 06:20:03 2002
Update of /cvsroot/expat/expat/tests
In directory usw-pr-cvs1:/tmp/cvs-serv24619/tests
Modified Files:
runtests.c
Log Message:
Added test for SF bug #480278.
Index: runtests.c
===================================================================
RCS file: /cvsroot/expat/expat/tests/runtests.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** runtests.c 20 Apr 2002 02:53:15 -0000 1.11
--- runtests.c 20 Apr 2002 13:19:40 -0000 1.12
***************
*** 237,240 ****
--- 237,258 ----
END_TEST
+ START_TEST(test_utf16)
+ {
+ /* <?xml version="1.0" encoding="UTF-16"?>
+ * <doc a='123'>some text</doc>
+ */
+ char text[] =
+ "\000<\000?\000x\000m\000\154\000 \000v\000e\000r\000s\000i\000o"
+ "\000n\000=\000'\0001\000.\000\060\000'\000 \000e\000n\000c\000o"
+ "\000d\000i\000n\000g\000=\000'\000U\000T\000F\000-\0001\000\066"
+ "\000'\000?\000>\000\n"
+ "\000<\000d\000o\000c\000 \000a\000=\000'\0001\0002\0003\000'"
+ "\000>\000s\000o\000m\000e\000 \000t\000e\000x\000t\000<\000/"
+ "\000d\000o\000c\000>";
+ if (!XML_Parse(parser, text, sizeof(text) - 1, 1))
+ xml_failure();
+ }
+ END_TEST
+
/* Helpers used by the following test; this checks any "attr" and "refs"
***************
*** 436,439 ****
--- 454,458 ----
tcase_add_test(tc_chars, test_bom_utf16_le);
tcase_add_test(tc_chars, test_illegal_utf8);
+ tcase_add_test(tc_chars, test_utf16);
/* Regression test for SF bug #491986. */
tcase_add_test(tc_chars, test_danish_latin1);