This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include <string.h>
22
23 #include <locale.h>
24
25 #include "macros.h"
26
27 int
28 main ()
29 {
30
31 if (setlocale (LC_ALL, "") == NULL)
32 return 1;
33
34 ASSERT (mbsncasecmp ("paragraph", "Paragraph", 1000000) == 0);
35 ASSERT (mbsncasecmp ("paragraph", "Paragraph", 9) == 0);
36
37 ASSERT (mbsncasecmp ("paragrapH", "parAgRaph", 1000000) == 0);
38 ASSERT (mbsncasecmp ("paragrapH", "parAgRaph", 9) == 0);
39
40 ASSERT (mbsncasecmp ("paragraph", "paraLyzed", 10) < 0);
41 ASSERT (mbsncasecmp ("paragraph", "paraLyzed", 9) < 0);
42 ASSERT (mbsncasecmp ("paragraph", "paraLyzed", 5) < 0);
43 ASSERT (mbsncasecmp ("paragraph", "paraLyzed", 4) == 0);
44 ASSERT (mbsncasecmp ("paraLyzed", "paragraph", 10) > 0);
45 ASSERT (mbsncasecmp ("paraLyzed", "paragraph", 9) > 0);
46 ASSERT (mbsncasecmp ("paraLyzed", "paragraph", 5) > 0);
47 ASSERT (mbsncasecmp ("paraLyzed", "paragraph", 4) == 0);
48
49 ASSERT (mbsncasecmp ("para", "paragraph", 10) < 0);
50 ASSERT (mbsncasecmp ("para", "paragraph", 9) < 0);
51 ASSERT (mbsncasecmp ("para", "paragraph", 5) < 0);
52 ASSERT (mbsncasecmp ("para", "paragraph", 4) == 0);
53 ASSERT (mbsncasecmp ("paragraph", "para", 10) > 0);
54 ASSERT (mbsncasecmp ("paragraph", "para", 9) > 0);
55 ASSERT (mbsncasecmp ("paragraph", "para", 5) > 0);
56 ASSERT (mbsncasecmp ("paragraph", "para", 4) == 0);
57
58
59
60
61 ASSERT (mbsncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) == 0);
62 ASSERT (mbsncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) == 0);
63
64
65 ASSERT (mbsncasecmp ("turkish", "TURK\304\260SH", 7) == 0);
66 ASSERT (mbsncasecmp ("TURK\304\260SH", "turkish", 7) == 0);
67
68 return 0;
69 }