2000-06-27 15:53:49 +00:00
|
|
|
/*
|
|
|
|
* TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
|
|
|
|
*
|
|
|
|
* FILE: dat_wcwidth.c
|
|
|
|
*
|
|
|
|
* WCWIDTH: int wcwidth (wchar_t wc);
|
|
|
|
*/
|
|
|
|
|
|
|
|
TST_WCWIDTH tst_wcwidth_loc [] = {
|
|
|
|
{
|
|
|
|
{ Twcwidth, TST_LOC_de },
|
|
|
|
{
|
|
|
|
{ /*inp*/ { 0x0000 }, /* #01 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,0, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x0020 }, /* #02 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x007F }, /* #03 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x0080 }, /* #04 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x00A1 }, /* #05 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x00C1 }, /* #06 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
2000-06-28 04:27:24 +00:00
|
|
|
#ifdef SHOJI_IS_RIGHT
|
2000-06-27 15:53:49 +00:00
|
|
|
/* <WAIVER> */ /* CHECK : wint_t */
|
|
|
|
{ /*inp*/ { 0x3041 }, /* #07 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,0, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
2000-06-28 04:27:24 +00:00
|
|
|
#else
|
|
|
|
{ /*inp*/ { 0x3041 }, /* #07 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,EOF, },
|
2000-06-28 04:27:24 +00:00
|
|
|
},
|
|
|
|
#endif
|
2003-01-03 22:32:41 +00:00
|
|
|
{ .is_last = 1 }
|
2000-06-27 15:53:49 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{ Twcwidth, TST_LOC_enUS },
|
|
|
|
{
|
|
|
|
{ /*inp*/ { 0x0000 }, /* #01 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,0, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x0020 }, /* #02 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x007F }, /* #03 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x0080 }, /* #04 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x00A1 }, /* #05 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x00C1 }, /* #06 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x3041 }, /* #07 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
2003-01-03 22:32:41 +00:00
|
|
|
{ .is_last = 1 }
|
2000-06-27 15:53:49 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{ Twcwidth, TST_LOC_eucJP },
|
|
|
|
{
|
|
|
|
{ /*inp*/ { 0x0000 }, /* #01 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,0, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x0020 }, /* #02 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x007F }, /* #03 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x0080 }, /* #04 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,-1, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
2000-06-28 04:27:24 +00:00
|
|
|
#ifdef SHOJI_IS_RIGHT
|
2000-06-27 15:53:49 +00:00
|
|
|
/* <NO_WAIVER> */
|
|
|
|
{ /*inp*/ { 0x00A1 }, /* #05 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,0, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
2000-06-28 04:27:24 +00:00
|
|
|
#else
|
|
|
|
/* XXX U00A1 is a valid character in EUC-JP. */
|
|
|
|
{ /*inp*/ { 0x00A1 }, /* #05 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,2, },
|
2000-06-28 04:27:24 +00:00
|
|
|
},
|
|
|
|
#endif
|
2000-06-27 15:53:49 +00:00
|
|
|
/* jisx0212 */
|
|
|
|
{ /*inp*/ { 0x00C1 }, /* #06 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,2, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
|
|
|
{ /*inp*/ { 0x3041 }, /* #07 */
|
2000-08-18 09:34:18 +00:00
|
|
|
/*exp*/ { 0, 1,2, },
|
2000-06-27 15:53:49 +00:00
|
|
|
},
|
2003-01-03 22:32:41 +00:00
|
|
|
{ .is_last = 1 }
|
2000-06-27 15:53:49 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{ Twcwidth, TST_LOC_end }
|
|
|
|
}
|
|
|
|
};
|