X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftst_icu_I18N.c;h=c58ac85b15dfa4376e3973ff6ce58f418c4fe80a;hb=e089d89f38b4fc61fce16eb03150776844b053f8;hp=1d6e2051f0046313ba4c2c39f1e1a794b580590b;hpb=c5408040f72a5a23dc23d6c8d30ee61ea8b6effc;p=yaz-moved-to-github.git diff --git a/test/tst_icu_I18N.c b/test/tst_icu_I18N.c index 1d6e205..c58ac85 100644 --- a/test/tst_icu_I18N.c +++ b/test/tst_icu_I18N.c @@ -1,23 +1,10 @@ -/* $Id: tst_icu_I18N.c,v 1.11 2007-10-29 13:50:57 marc Exp $ - Copyright (c) 2006-2007, Index Data. - - This file is part of Pazpar2. - - Pazpar2 is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2, or (at your option) any later - version. - - Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with Pazpar2; see the file LICENSE. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ +/* + * Copyright (C) 2005-2007, Index Data ApS + * See the file LICENSE for details. + * + * $Id: tst_icu_I18N.c,v 1.14 2007-11-08 13:35:14 adam Exp $ + * + */ /* DO NOT EDIT THIS FILE IF YOUR EDITOR DOES NOT SUPPORT UTF-8 */ @@ -33,7 +20,7 @@ #include -#if HAVE_ICU +#if YAZ_HAVE_ICU #include #include @@ -493,7 +480,7 @@ void test_icu_I18N_chain(int argc, char **argv) struct icu_chain * chain = 0; - const char * xml_str = "" + const char * xml_str = "" "" "" "" @@ -506,15 +493,13 @@ void test_icu_I18N_chain(int argc, char **argv) xmlNode *xml_node = xmlDocGetRootElement(doc); YAZ_CHECK(xml_node); - - chain = icu_chain_xml_config(xml_node, (uint8_t *) "en", 0, &status); + chain = icu_chain_xml_config(xml_node, 0, &status); xmlFreeDoc(doc); YAZ_CHECK(chain); YAZ_CHECK(icu_chain_assign_cstr(chain, en_str, &status)); - //printf("ICU chain:\ninput: '%s'\n", en_str); while (icu_chain_next_token(chain, &status)){ ; /* printf("%d '%s' '%s'\n", @@ -548,7 +533,7 @@ void test_bug_1140(void) UErrorCode status = U_ZERO_ERROR; struct icu_chain * chain = 0; - const char * xml_str = "" + const char * xml_str = "" /* if the first rule is normalize instead. Then it works */ #if 0 @@ -565,7 +550,7 @@ void test_bug_1140(void) xmlNode *xml_node = xmlDocGetRootElement(doc); YAZ_CHECK(xml_node); - chain = icu_chain_xml_config(xml_node, (uint8_t *) "en", 0, &status); + chain = icu_chain_xml_config(xml_node, 0, &status); xmlFreeDoc(doc); YAZ_CHECK(chain); @@ -609,7 +594,7 @@ void test_chain_empty_token(void) UErrorCode status = U_ZERO_ERROR; struct icu_chain * chain = 0; - const char * xml_str = "" + const char * xml_str = "" "" "" ""; @@ -618,7 +603,7 @@ void test_chain_empty_token(void) xmlNode *xml_node = xmlDocGetRootElement(doc); YAZ_CHECK(xml_node); - chain = icu_chain_xml_config(xml_node, (uint8_t *) "en", 0, &status); + chain = icu_chain_xml_config(xml_node, 0, &status); xmlFreeDoc(doc); YAZ_CHECK(chain); @@ -645,7 +630,7 @@ void test_chain_empty_chain(void) UErrorCode status = U_ZERO_ERROR; struct icu_chain * chain = 0; - const char * xml_str = "" + const char * xml_str = "" ""; const char * src8 = "some 5487 weired !¤%&(/& sTuFf"; @@ -655,7 +640,7 @@ void test_chain_empty_chain(void) xmlNode *xml_node = xmlDocGetRootElement(doc); YAZ_CHECK(xml_node); - chain = icu_chain_xml_config(xml_node, (uint8_t *) "en", 0, &status); + chain = icu_chain_xml_config(xml_node, 0, &status); xmlFreeDoc(doc); YAZ_CHECK(chain); @@ -681,7 +666,7 @@ void test_chain_empty_chain(void) icu_chain_destroy(chain); } -#endif // HAVE_ICU +#endif /* YAZ_HAVE_ICU */ /* DO NOT EDIT THIS FILE IF YOUR EDITOR DOES NOT SUPPORT UTF-8 */ @@ -691,7 +676,7 @@ int main(int argc, char **argv) YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); -#if HAVE_ICU +#if YAZ_HAVE_ICU test_icu_I18N_casemap(argc, argv); test_icu_I18N_sortmap(argc, argv); @@ -702,13 +687,13 @@ int main(int argc, char **argv) test_chain_empty_chain(); test_bug_1140(); -#else /* HAVE_ICU */ +#else /* YAZ_HAVE_ICU */ printf("ICU unit tests omitted.\n" "Please install libicu36-dev and icu-doc or similar\n"); YAZ_CHECK(0 == 0); -#endif /* HAVE_ICU */ +#endif /* YAZ_HAVE_ICU */ YAZ_CHECK_TERM; }