2 STRCOLL: int strcoll (const char *s1, const char *s2)
5 #define TST_FUNCTION strcoll
7 #include "tsp_common.c"
8 #include "dat_strcoll.c"
11 tst_strcoll (FILE * fp
, int debug_flg
)
18 TST_HEAD_LOCALE (strcoll
, S_STRCOLL
);
21 TST_GET_ERRET (strcoll
);
22 s1
= TST_INPUT (strcoll
).s1
;
23 s2
= TST_INPUT (strcoll
).s2
;
26 ret
= strcoll (s1
, s2
);
31 fprintf (stdout
, "strcoll() [ %s : %d ] ret = %d\n", locale
,
33 fprintf (stdout
, " errno = %d\n",
35 fprintf (stdout
, " LC_COLLATE = %s\n",
36 (setlocale (LC_COLLATE
, NULL
)) ? setlocale (LC_COLLATE
,
40 TST_IF_RETURN (S_STRCOLL
)
46 Result (C_SUCCESS
, S_STRCOLL
, CASE_3
, MS_PASSED
);
51 Result (C_FAILURE
, S_STRCOLL
, CASE_3
,
52 "the return value should be greater than 0,"
56 else if (ret_exp
== -1)
60 Result (C_SUCCESS
, S_STRCOLL
, CASE_3
, MS_PASSED
);
65 Result (C_FAILURE
, S_STRCOLL
, CASE_3
,
66 "the return value should less than 0, but not ...");
69 else if (ret_exp
!= 0)
73 fprintf (stderr
, "*** Warning *** : tst_strcoll : "
74 "(check the test data); should set ret_flg=1"
75 " to check a return value");
78 Result (C_INVALID
, S_WCSCHR
, CASE_3
, "(check the test data); "
79 "should set ret_flg=1 to check a return value");