X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftest_icu.c;h=43833fb9f86557a3fb0b2ca7cc271d6e44a5cb36;hp=b1de907999d0930081515f84efac429d010e2eb6;hb=4df8de77ce5d4d97a9d5588f49a5c8298183776e;hpb=5a2b1f41cd0b3e0f5441a4cfb3b9484a1c4b017d diff --git a/test/test_icu.c b/test/test_icu.c index b1de907..43833fb 100644 --- a/test/test_icu.c +++ b/test/test_icu.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -27,6 +27,10 @@ #include #endif +#if YAZ_HAVE_XML2 +#include +#endif + #include #include @@ -364,6 +368,7 @@ static int test_icu_tokenizer(const char *locale, char action, struct icu_buf_utf16 *tkn16 = icu_buf_utf16_create(0); struct icu_buf_utf8 *tkn8 = icu_buf_utf8_create(0); struct icu_tokenizer *tokenizer = 0; + size_t org_start, org_len; /* transforming to UTF16 */ icu_utf16_from_utf8_cstr(src16, src8cstr, &status); @@ -379,7 +384,8 @@ static int test_icu_tokenizer(const char *locale, char action, icu_check_status(status); /* perform work on tokens */ - while (icu_tokenizer_next_token(tokenizer, tkn16, &status)) + while (icu_tokenizer_next_token(tokenizer, tkn16, &status, + &org_start, &org_len)) { icu_check_status(status); @@ -915,6 +921,10 @@ int main(int argc, char **argv) check_bug_1140(); u_cleanup(); +#if YAZ_HAVE_XML2 + xmlCleanupParser(); +#endif + #else /* YAZ_HAVE_ICU */ yaz_log(YLOG_LOG, "ICU unit tests omitted");