Back to index

glibc  2.9
dat_wcscspn.c
Go to the documentation of this file.
00001 /*
00002  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
00003  *
00004  *      FILE: dat_wcscspn.c
00005  *
00006  *      WCSCSPN:  size_t wcscspn (const wchar_t *ws1, const wchar_t *ws2);
00007  */
00008 
00009 
00010 TST_WCSCSPN tst_wcscspn_loc [] = {
00011 
00012     {  { Twcscspn, TST_LOC_de },
00013        {
00014          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00015                       { 0x00D1,0x0000            }, },  /* #1 */
00016            /*expect*/ { 0,1,0,                     },
00017          },
00018          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00019                       {       0x00D2,0x0000             }, },  /* #2 */
00020            /*expect*/ { 0,1,1,                     },
00021          },
00022          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00023                       {             0x00D3,0x0000 }, },  /* #3 */
00024            /*expect*/ { 0,1,2,                     },
00025          },
00026          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00027                       {       0x00D2,0x00D3,0x0000 }, },  /* #4 */
00028            /*expect*/ { 0,1,1,                     },
00029          },
00030          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00031                       { 0x00D2,0x00D3,0x00D4,0x0000 }, },  /* #5 */
00032            /*expect*/ { 0,1,1,                     },
00033          },
00034          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00035                       { 0x00D3,0x00D4,0x00D5,0x0000 }, },  /* #6 */
00036            /*expect*/ { 0,1,2,                     },
00037          },
00038          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00039                       { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #7 */
00040            /*expect*/ { 0,1,0,                     },
00041          },
00042          { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
00043                       { 0x00D2,0x000                    }, },  /* #8 */
00044            /*expect*/ { 0,1,0,                     },
00045          },
00046          { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00047                       { 0x0000,0x00D2,0x00D3,0x0000 }, },  /* #9 */
00048            /*expect*/ { 0,1,3,                     },
00049          },
00050          { /*input.*/ { { 0x00D1,0x00D2,0x0000          },
00051                       { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #10 */
00052            /*expect*/ { 0,1,0,                     },
00053          },
00054          { /*input.*/ { { 0x00D1,0x00D2,0x0000          },
00055                       { 0x00D1,0x00D3,0x00D4,0x0000 }, },  /* #11 */
00056            /*expect*/ { 0,1,0,                     },
00057          },
00058          { .is_last = 1 }
00059        }
00060     },
00061     {  { Twcscspn, TST_LOC_enUS },
00062        {
00063          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00064                       { 0x0041,0x0000            }, },  /* #1 */
00065            /*expect*/ { 0,1,0,                     },
00066          },
00067          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00068                       {       0x0042,0x0000             }, },  /* #2 */
00069            /*expect*/ { 0,1,1,                     },
00070          },
00071          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00072                       {             0x0043,0x0000 }, },  /* #3 */
00073            /*expect*/ { 0,1,2,                     },
00074          },
00075          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00076                       {       0x0042,0x0043,0x0000 }, },  /* #4 */
00077            /*expect*/ { 0,1,1,                     },
00078          },
00079          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00080                       { 0x0042,0x0043,0x0044,0x0000 }, },  /* #5 */
00081            /*expect*/ { 0,1,1,                     },
00082          },
00083          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00084                       { 0x0043,0x0044,0x0045,0x0000 }, },  /* #6 */
00085            /*expect*/ { 0,1,2,                     },
00086          },
00087          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00088                       { 0x0041,0x0042,0x0043,0x0000 }, },  /* #7 */
00089            /*expect*/ { 0,1,0,                     },
00090          },
00091          { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
00092                       { 0x0042,0x000                    }, },  /* #8 */
00093            /*expect*/ { 0,1,0,                     },
00094          },
00095          { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00096                       { 0x0000,0x0042,0x0043,0x0000 }, },  /* #9 */
00097            /*expect*/ { 0,1,3,                     },
00098          },
00099          { /*input.*/ { { 0x0041,0x0042,0x0000          },
00100                       { 0x0041,0x0042,0x0043,0x0000 }, },  /* #10 */
00101            /*expect*/ { 0,1,0,                     },
00102          },
00103          { /*input.*/ { { 0x0041,0x0042,0x0000          },
00104                       { 0x0041,0x0043,0x0044,0x0000 }, },  /* #11 */
00105            /*expect*/ { 0,1,0,                     },
00106          },
00107          { .is_last = 1 }
00108        }
00109     },
00110     {  { Twcscspn, TST_LOC_eucJP },
00111        {
00112          { /*input.*/ { { 0x3041,0x3042,0x0043,0x0000 },
00113                       { 0x3041,0x0000            }, },  /* #1 */
00114            /*expect*/ { 0,1,0,                     },
00115          },
00116          { /*input.*/ { { 0x3041,0x3042,0x0043,0x0000 },
00117                       {       0x3042,0x0000             }, },  /* #2 */
00118            /*expect*/ { 0,1,1,                     },
00119          },
00120          { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00121                       {             0x3043,0x0000 }, },  /* #3 */
00122            /*expect*/ { 0,1,2,                     },
00123          },
00124          { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00125                       {       0x3042,0x3043,0x0000 }, },  /* #4 */
00126            /*expect*/ { 0,1,1,                     },
00127          },
00128          { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00129                       { 0x3042,0x3043,0x3044,0x0000 }, },  /* #5 */
00130            /*expect*/ { 0,1,1,                     },
00131          },
00132          { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00133                       { 0x3043,0x3044,0x3045,0x0000 }, },  /* #6 */
00134            /*expect*/ { 0,1,2,                     },
00135          },
00136          { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00137                       { 0x3041,0x3042,0x3043,0x0000 }, },  /* #7 */
00138            /*expect*/ { 0,1,0,                     },
00139          },
00140          { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
00141                       { 0x3042,0x0000            }, },  /* #8 */
00142            /*expect*/ { 0,1,0,                     },
00143          },
00144          { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00145                       { 0x0000,0x3042,0x3043,0x0000 }, },  /* #9 */
00146            /*expect*/ { 0,1,3,                     },
00147          },
00148          { /*input.*/ { { 0x3041,0x3042,0x0000          },
00149                       { 0x3041,0x3042,0x3043,0x0000 }, },  /* #10 */
00150            /*expect*/ { 0,1,0,                     },
00151          },
00152          { /*input.*/ { { 0x3041,0x3042,0x0000          },
00153                       { 0x3041,0x3043,0x3044,0x0000 }, },  /* #11 */
00154            /*expect*/ { 0,1,0,                     },
00155          },
00156          { .is_last = 1 }
00157        }
00158     },
00159     {  { Twcscspn, TST_LOC_end }}
00160 };