diff options
Diffstat (limited to 'localedata/tests-mbwc/dat_wcswidth.c')
-rw-r--r-- | localedata/tests-mbwc/dat_wcswidth.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/localedata/tests-mbwc/dat_wcswidth.c b/localedata/tests-mbwc/dat_wcswidth.c index f8d51341d7..a1c7076e60 100644 --- a/localedata/tests-mbwc/dat_wcswidth.c +++ b/localedata/tests-mbwc/dat_wcswidth.c @@ -64,10 +64,10 @@ TST_WCSWIDTH tst_wcswidth_loc [] = { { /*input.*/ { { 0x00C1,0x00FF,0x0000 }, 2 }, /* 18 */ /*expect*/ { 0,0,1,2 }, }, - { /*input.*/ { { 0x00C1,0x3042,0x0000 }, 2 }, /* 19 */ /* <WAIVER> */ /* returns 2 */ + { /*input.*/ { { 0x00C1,0x3042,0x0000 }, 2 }, /* 19 */ /*expect*/ { 0,0,1,-1 }, }, - { /*input.*/ { { 0x00C1,0x3044,0x0000 }, 2 }, /* 20 */ /* <WAIVER> */ /* returns 2 */ + { /*input.*/ { { 0x00C1,0x3044,0x0000 }, 2 }, /* 20 */ /*expect*/ { 0,0,1,-1 }, }, { is_last: 1 } @@ -85,12 +85,21 @@ TST_WCSWIDTH tst_wcswidth_loc [] = { { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 2 }, /* 03 */ /*expect*/ { 0,0,1,2 }, }, +#ifdef SHOJI_IS_RIGHT { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 3 }, /* 04 */ /*expect*/ { 0,0,1,3 }, }, { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 4 }, /* 05 */ /*expect*/ { 0,0,1,3 }, }, +#else + { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 }, 3 }, /* 04 */ + /*expect*/ { 0,0,1,-1 }, + }, + { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 }, 4 }, /* 05 */ + /*expect*/ { 0,0,1,3 }, + }, +#endif { /*input.*/ { { 0x0000 }, 1 }, /* 06 */ /*expect*/ { 0,0,1,0 }, }, @@ -124,17 +133,24 @@ TST_WCSWIDTH tst_wcswidth_loc [] = { { /*input.*/ { { 0x0041,0x00A0,0x0000 }, 2 }, /* 16 */ /*expect*/ { 0,0,1,-1 }, }, +#ifdef SHOJI_IS_RIGHT { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */ /*expect*/ { 0,0,1,2 }, }, { /*input.*/ { { 0x0041,0x00FF,0x0000 }, 2 }, /* 18 */ /*expect*/ { 0,0,1,2 }, }, - /* <WAIVER> */ /* returns 2 */ +#else + { /*input.*/ { { 0x0041,0x007E,0x0000 }, 2 }, /* 17 */ + /*expect*/ { 0,0,1,2 }, + }, + { /*input.*/ { { 0x0041,0x0020,0x0000 }, 2 }, /* 18 */ + /*expect*/ { 0,0,1,2 }, + }, +#endif { /*input.*/ { { 0x0041,0x3042,0x0000 }, 2 }, /* 19 */ /*expect*/ { 0,0,1,-1 }, }, - /* <WAIVER> */ /* returns 2 */ { /*input.*/ { { 0x0041,0x3044,0x0000 }, 2 }, /* 20 */ /*expect*/ { 0,0,1,-1 }, }, @@ -192,10 +208,17 @@ TST_WCSWIDTH tst_wcswidth_loc [] = { { /*input.*/ { { 0x0041,0x00A0,0x0000 }, 2 }, /* 16 */ /*expect*/ { 0,0,1,-1 }, }, +#ifdef NO_WAIVER /* <NO_WAIVER> */ /* returns 3 */ { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */ /*expect*/ { 0,0,1,-1 }, }, +#else + /* XXX U00A1 is valid -> /x8f/xa2/xc4 in JIS X 0212 */ + { /*input.*/ { { 0x0041,0x00A1,0x0000 }, 2 }, /* 17 */ + /*expect*/ { 0,0,1,3 }, + }, +#endif { /*input.*/ { { 0x0041,0xFF71,0x0000 }, 2 }, /* 18 */ /*expect*/ { 0,0,1,2 }, }, |