YAZ_CHECK(num > 2 && !strcmp(array[2], "b,"));
YAZ_CHECK(num > 3 && !strcmp(array[3], "cd"));
- nmem_strsplit_escape(nmem, ",", "\\,a,b\\,,cd", &array, &num, 0, '\\');
+ nmem_strsplit_escape(nmem, ",", "\\,a,b\\,,c\\d", &array, &num, 0, '\\');
YAZ_CHECK(num == 3);
YAZ_CHECK(num > 0 && !strcmp(array[0], ",a"));
YAZ_CHECK(num > 1 && !strcmp(array[1], "b,"));
YAZ_CHECK(num > 2 && !strcmp(array[2], "cd"));
- nmem_strsplit_escape(nmem, ",", "\\,a,b\\,\\,cd", &array, &num, 0, '\\');
+ nmem_strsplit_escape(nmem, ",", "\\,a,b\\,\\,c\\\\\\|d", &array, &num, 0, '\\');
YAZ_CHECK(num == 2);
YAZ_CHECK(num > 0 && !strcmp(array[0], ",a"));
- YAZ_CHECK(num > 1 && !strcmp(array[1], "b,,cd"));
+ YAZ_CHECK(num > 1 && !strcmp(array[1], "b,,c\\|d"));
nmem_destroy(nmem);
}
int main (int argc, char **argv)
{
YAZ_CHECK_INIT(argc, argv);
+ YAZ_CHECK_LOG();
tst_nmem_malloc();
tst_nmem_strsplit();
YAZ_CHECK_TERM;