diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-07-10 10:30:28 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-07-10 10:30:28 +0000 |
commit | bb9231c8402e9ae99f98a868429e73c6340da304 (patch) | |
tree | d7ed637099fba4ab6db1cc4c009cad8485dcdb66 /test/locale-mbwc/dat_wctob.c | |
parent | a691312d8794d5516402bb6bb0d3e90c40ba188b (diff) |
Added missing tests for locale with multibyte encoding
Diffstat (limited to 'test/locale-mbwc/dat_wctob.c')
-rw-r--r-- | test/locale-mbwc/dat_wctob.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/test/locale-mbwc/dat_wctob.c b/test/locale-mbwc/dat_wctob.c new file mode 100644 index 000000000..dfd344eb8 --- /dev/null +++ b/test/locale-mbwc/dat_wctob.c @@ -0,0 +1,61 @@ +/* + * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY + * + * FILE: dat_wctob.c + * + * ISW*: int wctob( wint_t wc ); + */ + + +TST_WCTOB tst_wctob_loc [] = { + + { { Twctob, TST_LOC_de }, + { + { { WEOF }, { 0, 1, EOF } }, + { { 0x0020 }, { 0, 1, 0x20 } }, + { { 0x0061 }, { 0, 1, 0x61 } }, + { { 0x0080 }, { 0, 1, 0x80 } }, + { { 0x00C4 }, { 0, 1, 0xC4 } }, + { { 0x30C4 }, { 0, 1, EOF } }, + { .is_last = 1 } /* Last element. */ + } + }, + { { Twctob, TST_LOC_enUS }, + { + { { WEOF }, { 0, 1, EOF } }, + { { 0x0020 }, { 0, 1, 0x20 } }, + { { 0x0061 }, { 0, 1, 0x61 } }, +#ifdef SHOJI_IS_RIGHT + { { 0x0080 }, { 0, 1, 0x80 } }, + { { 0x00C4 }, { 0, 1, 0xC4 } }, +#else + /* XXX These are no valid characters. */ + { { 0x0080 }, { 0, 1, EOF } }, + { { 0x00C4 }, { 0, 1, EOF } }, +#endif + { { 0x30C4 }, { 0, 1, EOF } }, + { .is_last = 1 } /* Last element. */ + } + }, +#if 0 + { { Twctob, TST_LOC_eucJP }, +#else + { { Twctob, TST_LOC_ja_UTF8 }, +#endif + { + { { WEOF }, { 0, 1, EOF } }, + { { 0x0020 }, { 0, 1, 0x20 } }, + { { 0x0061 }, { 0, 1, 0x61 } }, +#if 0 + { { 0x0080 }, { 0, 1, 0x80 } }, +#else + { { 0x0080 }, { 0, 1, EOF } }, +#endif + { { 0x00FF }, { 0, 1, EOF } }, + { { 0x00C4 }, { 0, 1, EOF } }, + { { 0x30C4 }, { 0, 1, EOF } }, + { .is_last = 1 } /* Last element. */ + } + }, + { { Twctob, TST_LOC_end } } +}; |