1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Test of case-insensitive string comparison function.
4 Copyright (C) 2007-2011 Free Software Foundation, Inc.
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
32 /* configure should already have checked that the locale is supported. */
33 if (setlocale (LC_ALL, "") == NULL)
36 ASSERT (mbscasecmp ("paragraph", "Paragraph") == 0);
38 ASSERT (mbscasecmp ("paragrapH", "parAgRaph") == 0);
40 ASSERT (mbscasecmp ("paragraph", "paraLyzed") < 0);
41 ASSERT (mbscasecmp ("paraLyzed", "paragraph") > 0);
43 ASSERT (mbscasecmp ("para", "paragraph") < 0);
44 ASSERT (mbscasecmp ("paragraph", "para") > 0);
46 /* The following tests shows how mbscasecmp() is different from
49 ASSERT (mbscasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") == 0); /* özgür */
50 ASSERT (mbscasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") == 0); /* özgür */
52 /* This test shows how strings of different size can compare equal. */
53 ASSERT (mbscasecmp ("turkish", "TURK\304\260SH") == 0);
54 ASSERT (mbscasecmp ("TURK\304\260SH", "turkish") == 0);