X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flibpspp%2Fstringi-set-test.c;h=daf7b2fa6d97a6cfaf382c5e1b71ffbfe5ce8024;hb=9143807c6c683bce1fd369a4d420dd7024368057;hp=a20e84ce185d9ab2087860bbe0a878d8a7cc2e74;hpb=c83f5c5360ea8b67ae4fd81c35ae606724aa0da9;p=pspp diff --git a/tests/libpspp/stringi-set-test.c b/tests/libpspp/stringi-set-test.c index a20e84ce18..daf7b2fa6d 100644 --- a/tests/libpspp/stringi-set-test.c +++ b/tests/libpspp/stringi-set-test.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,6 +36,7 @@ #include #include "libpspp/compiler.h" +#include "libpspp/i18n.h" #include "libpspp/str.h" /* Exit with a failure code. @@ -244,7 +245,7 @@ check_set_contains (struct stringi_set *set, const char *string) node = stringi_set_find_node (set, string); check (node != NULL); - check (!strcasecmp (string, stringi_set_node_get_string (node))); + check (!utf8_strcasecmp (string, stringi_set_node_get_string (node))); } /* Checks that SET contains the CNT strings in DATA, that its structure is @@ -302,7 +303,7 @@ check_stringi_set (struct stringi_set *set, const int data[], size_t cnt) check (s == array[i]); for (j = 0; j < left; j++) - if (!strcasecmp (s, make_string (data_copy[j]))) + if (!utf8_strcasecmp (s, make_string (data_copy[j]))) { data_copy[j] = data_copy[--left]; goto next; @@ -319,7 +320,7 @@ check_stringi_set (struct stringi_set *set, const int data[], size_t cnt) for (i = 0; i < cnt; i++) { if (i > 0) - check (strcasecmp (array[i - 1], array[i]) < 0); + check (utf8_strcasecmp (array[i - 1], array[i]) < 0); check (stringi_set_contains (set, array[i])); } free (array);