]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/uclibc/lib/contrib/uclibc/test/locale-mbwc/tst_wcswidth.c
Update
[l4.git] / l4 / pkg / l4re-core / uclibc / lib / contrib / uclibc / test / locale-mbwc / tst_wcswidth.c
1 /*
2   WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n);
3 */
4
5 #define TST_FUNCTION wcswidth
6
7 #include "tsp_common.c"
8 #include "dat_wcswidth.c"
9
10 int
11 tst_wcswidth (FILE *fp, int debug_flg)
12 {
13   TST_DECL_VARS (int);
14   wchar_t *ws;
15   int n;
16
17   TST_DO_TEST (wcswidth)
18   {
19     TST_HEAD_LOCALE (wcswidth, S_WCSWIDTH);
20     TST_DO_REC (wcswidth)
21     {
22       TST_GET_ERRET (wcswidth);
23       ws = TST_INPUT (wcswidth).ws;
24       n = TST_INPUT (wcswidth).n;
25       ret = wcswidth (ws, n);
26
27       if (debug_flg)
28         {
29           fprintf (stderr, "wcswidth: [ %d ] : ret = %d\n", rec + 1, ret);
30         }
31
32       TST_IF_RETURN (S_WCSWIDTH)
33       {
34       };
35     }
36   }
37
38   return err_count;
39 }