diff options
| author | Andreas Jaeger <aj@suse.de> | 2000-06-29 10:36:12 +0000 |
|---|---|---|
| committer | Andreas Jaeger <aj@suse.de> | 2000-06-29 10:36:12 +0000 |
| commit | 5ca8accdcd234f3479a9b686b3519768be9af69b (patch) | |
| tree | 94acd3d8caae432164e69392d278a1a0539f8633 | |
| parent | ee6c9d77a3407e265106181a0e543f59b635f757 (diff) | |
| download | glibc-5ca8accdcd234f3479a9b686b3519768be9af69b.tar.xz glibc-5ca8accdcd234f3479a9b686b3519768be9af69b.zip | |
Update.
(tst_mbrtowc-ENV): New.
(tst_mbsrtowcs-ENV): New.
(tst_mbstowcs-ENV): New.
(tst_strfmon-ENV): New.
(tst_wcrtomb-ENV): New.
(tst_wcsrtombs-ENV): New.
(tst_wcstod-ENV): New.
(tst_wcstok-ENV): New.
(tst_wcstombs-ENV): New.
* tests-mbwc/dat_wcstok.c: Likewise.
* tests-mbwc/tst_wcstok.c: Likewise.
* tests-mbwc/dat_wcstod.c: Likewise.
* tests-mbwc/tst_wcstod.c: Likewise.
* tests-mbwc/dat_mbrtowc.c: Likewise.
* tests-mbwc/tst_mbrtowc.c: Likewise.
* tests-mbwc/dat_wcsrtombs.c: Likewise.
* tests-mbwc/tst_wcsrtombs.c: Likewise.
* tests-mbwc/dat_wcstombs.c: Likewise.
* tests-mbwc/tst_wcstombs.c: Likewise.
* tests-mbwc/dat_mbsrtowcs.c: Likewise.
* tests-mbwc/tst_mbsrtowcs.c: Likewise.
* tests-mbwc/dat_wcrtomb.c: Likewise.
* tests-mbwc/tst_wcrtomb.c: Likewise.
* tests-mbwc/dat_mbstowcs.c: Likewise.
* tests-mbwc/tst_mbstowcs.c: Likewise.
* tests-mbwc/dat_strfmon.c: Likewise.
* tests-mbwc/tst_strfmon.c: Likewise.
| -rw-r--r-- | localedata/ChangeLog | 27 | ||||
| -rw-r--r-- | localedata/Makefile | 36 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_mbrtowc.c | 140 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_mbsrtowcs.c | 137 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_mbstowcs.c | 129 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_wcrtomb.c | 93 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_wcsrtombs.c | 207 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_wcstod.c | 74 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_wcstok.c | 134 | ||||
| -rw-r--r-- | localedata/tests-mbwc/dat_wcstombs.c | 206 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_mbrtowc.c | 103 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_mbsrtowcs.c | 108 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_mbstowcs.c | 97 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_wcrtomb.c | 79 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_wcsrtombs.c | 127 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_wcstod.c | 68 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_wcstok.c | 94 | ||||
| -rw-r--r-- | localedata/tests-mbwc/tst_wcstombs.c | 115 |
18 files changed, 1962 insertions, 12 deletions
diff --git a/localedata/ChangeLog b/localedata/ChangeLog index e7bfaf4d24..20ffbfeeeb 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -6,6 +6,15 @@ (tst_strcoll-ENV): New. (tst_strxfrm-ENV): New. (tst_wctomb-ENV): New. + (tst_mbrtowc-ENV): New. + (tst_mbsrtowcs-ENV): New. + (tst_mbstowcs-ENV): New. + (tst_strfmon-ENV): New. + (tst_wcrtomb-ENV): New. + (tst_wcsrtombs-ENV): New. + (tst_wcstod-ENV): New. + (tst_wcstok-ENV): New. + (tst_wcstombs-ENV): New. * tests-mbwc/tst_wctomb.c: New test file from Shoji Kuwabara <kuwahara@cthulhu.engr.sgi.com>. @@ -18,6 +27,24 @@ * tests-mbwc/tst_strcoll.c: Likewise. * tests-mbwc/tst_mblen.c: Likewise. * tests-mbwc/dat_mblen.c: Likewise. + * tests-mbwc/dat_wcstok.c: Likewise. + * tests-mbwc/tst_wcstok.c: Likewise. + * tests-mbwc/dat_wcstod.c: Likewise. + * tests-mbwc/tst_wcstod.c: Likewise. + * tests-mbwc/dat_mbrtowc.c: Likewise. + * tests-mbwc/tst_mbrtowc.c: Likewise. + * tests-mbwc/dat_wcsrtombs.c: Likewise. + * tests-mbwc/tst_wcsrtombs.c: Likewise. + * tests-mbwc/dat_wcstombs.c: Likewise. + * tests-mbwc/tst_wcstombs.c: Likewise. + * tests-mbwc/dat_mbsrtowcs.c: Likewise. + * tests-mbwc/tst_mbsrtowcs.c: Likewise. + * tests-mbwc/dat_wcrtomb.c: Likewise. + * tests-mbwc/tst_wcrtomb.c: Likewise. + * tests-mbwc/dat_mbstowcs.c: Likewise. + * tests-mbwc/tst_mbstowcs.c: Likewise. + * tests-mbwc/dat_strfmon.c: Likewise. + * tests-mbwc/tst_strfmon.c: Likewise. 2000-06-28 Ulrich Drepper <drepper@redhat.com> diff --git a/localedata/Makefile b/localedata/Makefile index fe6ea109c7..97126bfd40 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -76,17 +76,20 @@ include ../Makeconfig ifeq (no,$(cross-compiling)) ifeq (yes,$(build-shared)) -locale_test_suite := tst_iswalnum tst_iswprint tst_towctrans tst_wcsncmp \ - tst_wctrans tst_iswalpha tst_iswpunct tst_wcschr \ - tst_wcspbrk tst_wctype tst_iswcntrl tst_iswspace \ - tst_wcscoll tst_wcsspn tst_iswdigit tst_iswupper \ - tst_wcscpy tst_wcsstr tst_iswgraph tst_iswxdigit \ - tst_wcscspn tst_wcswidth tst_iswlower tst_swscanf \ - tst_wcslen tst_wctob tst_iswctype tst_towlower \ - tst_wcscat tst_towupper tst_wcscmp tst_wcsncat \ - tst_wcsncpy tst_wcsxfrm tst_wcwidth tst_mbrlen \ - tst_mblen tst_strcoll tst_strxfrm tst_mbtowc \ - tst_wctomb +locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \ + tst_iswctype tst_iswdigit tst_iswgraph \ + tst_iswlower tst_iswprint tst_iswpunct \ + tst_iswspace tst_iswupper tst_iswxdigit tst_mblen \ + tst_mbrlen tst_mbrtowc tst_mbsrtowcs tst_mbstowcs \ + tst_mbtowc tst_strcoll tst_strfmon tst_strxfrm \ + tst_swscanf tst_towctrans tst_towlower \ + tst_towupper tst_wcrtomb tst_wcscat tst_wcschr \ + tst_wcscmp tst_wcscoll tst_wcscpy tst_wcscspn \ + tst_wcslen tst_wcsncat tst_wcsncmp tst_wcsncpy \ + tst_wcspbrk tst_wcsrtombs tst_wcsspn tst_wcsstr \ + tst_wcstod tst_wcstok tst_wcstombs tst_wcswidth \ + tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \ + tst_wctype tst_wcwidth tests = $(locale_test_suite) endif @@ -135,7 +138,7 @@ do-tst-mbswcs: tst-mbswcs.sh $(objpfx)tst-mbswcs1 $(objpfx)tst-mbswcs2 \ do-tst-ctype: tst-ctype.sh $(objpfx)tst-ctype do-collate-test do-tst-mbswcs $(SHELL) -e $< $(common-objpfx) $(addsuffix .out,$(addprefix $(objpfx),$(locale_test_suite))): %: do-tst-ctype\ - do-tst-mbswcs + do-tst-mbswcs endif endif @@ -167,13 +170,18 @@ tst_iswupper-ENV = $(TEST_MBWC_ENV) tst_iswxdigit-ENV = $(TEST_MBWC_ENV) tst_mblen-ENV = $(TEST_MBWC_ENV) tst_mbrlen-ENV = $(TEST_MBWC_ENV) +tst_mbrtowc-ENV = $(TEST_MBWC_ENV) +tst_mbsrtowcs-ENV = $(TEST_MBWC_ENV) +tst_mbstowcs-ENV = $(TEST_MBWC_ENV) tst_mbtowc-ENV = $(TEST_MBWC_ENV) tst_strcoll-ENV = $(TEST_MBWC_ENV) +tst_strfmon-ENV = $(TEST_MBWC_ENV) tst_strxfrm-ENV = $(TEST_MBWC_ENV) tst_swscanf-ENV = $(TEST_MBWC_ENV) tst_towctrans-ENV = $(TEST_MBWC_ENV) tst_towlower-ENV = $(TEST_MBWC_ENV) tst_towupper-ENV = $(TEST_MBWC_ENV) +tst_wcrtomb-ENV = $(TEST_MBWC_ENV) tst_wcscat-ENV = $(TEST_MBWC_ENV) tst_wcschr-ENV = $(TEST_MBWC_ENV) tst_wcscmp-ENV = $(TEST_MBWC_ENV) @@ -185,8 +193,12 @@ tst_wcsncat-ENV = $(TEST_MBWC_ENV) tst_wcsncmp-ENV = $(TEST_MBWC_ENV) tst_wcsncpy-ENV = $(TEST_MBWC_ENV) tst_wcspbrk-ENV = $(TEST_MBWC_ENV) +tst_wcsrtombs-ENV = $(TEST_MBWC_ENV) tst_wcsspn-ENV = $(TEST_MBWC_ENV) tst_wcsstr-ENV = $(TEST_MBWC_ENV) +tst_wcstod-ENV = $(TEST_MBWC_ENV) +tst_wcstok-ENV = $(TEST_MBWC_ENV) +tst_wcstombs-ENV = $(TEST_MBWC_ENV) tst_wcswidth-ENV = $(TEST_MBWC_ENV) tst_wcsxfrm-ENV = $(TEST_MBWC_ENV) tst_wctob-ENV = $(TEST_MBWC_ENV) diff --git a/localedata/tests-mbwc/dat_mbrtowc.c b/localedata/tests-mbwc/dat_mbrtowc.c new file mode 100644 index 0000000000..e8794820b6 --- /dev/null +++ b/localedata/tests-mbwc/dat_mbrtowc.c @@ -0,0 +1,140 @@ +/* + * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY + * + * FILE: dat_mbrtowc.c + * + * MBTOWC: size_t mbrtowc (wchar_t *pwc, char *s, size_t n, + * mbstate_t *ps); + */ + +#include <limits.h> + +/* Note: + assumes en_US = en_US.ascii +*/ + + + + +TST_MBRTOWC tst_mbrtowc_loc [] = { + { + { Tmbrtowc, TST_LOC_de }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, 1, "ÄÖÜ", 1, 0, 0 }, + { 1, 1, "ÄÖÜ", 2, 0, 0 }, + { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + } + }, + { + { + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, 1, "ÄÖÜ", 1, 0, 0 }, + { 1, 1, "ÄÖÜ", 2, 0, 0 }, + { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + } + }, + { + { + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + } + } + }, + { is_last: 1 } + } + }, +#if 0 + /* XXX: These tests don't make sense to me. */ + { + { Tmbrtowc, TST_LOC_enUS }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, 1, "ÄÖÜ", 1, 0, 0 }, + { 1, 1, "ÄÖÜ", 2, 0, 0 }, + { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + } + }, + { + { + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, 1, "ÄÖÜ", 1, 0, 0 }, + { 1, 1, "ÄÖÜ", 2, 0, 0 }, + { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + } + }, + { + { + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + } + } + }, + { is_last: 1 } + } + }, + { + { Tmbrtowc, TST_LOC_eucJP }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, 1, "ÄÖÜ", 1, 0, 0 }, + { 1, 1, "ÄÖÜ", 2, 0, 0 }, + { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + } + }, + { + { + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, 1, "ÄÖÜ", 1, 0, 0 }, + { 1, 1, "ÄÖÜ", 2, 0, 0 }, + { 1, 1, "ÄÖÜ", USE_MBCURMAX, 0, 0 }, + } + }, + { + { + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + { 0, 0, 1, 1, 0x00C4 }, + } + } + }, + { is_last: 1 } + } + }, +#endif + { + { Tmbrtowc, TST_LOC_end } + } +}; diff --git a/localedata/tests-mbwc/dat_mbsrtowcs.c b/localedata/tests-mbwc/dat_mbsrtowcs.c new file mode 100644 index 0000000000..eddc0607b7 --- /dev/null +++ b/localedata/tests-mbwc/dat_mbsrtowcs.c @@ -0,0 +1,137 @@ +/* + * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY + * + * FILE: dat_mbsrtowcs.c + * + * MBSRTOWCS: size_t mbsrtowcs (wchar_t *ws, char **s, size_t n, + * mbstate_t *ps); + */ + + +TST_MBSRTOWCS tst_mbsrtowcs_loc [] = { + { + { Tmbsrtowcs, TST_LOC_de }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, "üäö", 4, 0,0 }, + { 1, "üäö", 3, 0,0 }, + { 1, "üäö", 2, 0,0 }, + } + }, + { + { + { 0,0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } }, + { 0,0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } }, + { 0,0,1,2, { 0x00FC,0x00E4,0x00F6,0x0000 } }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, "üäö", 4, 0,0 }, + { 1, "", 1, 0,0 }, + { 0, "üäö", 4, 0,0 }, + } + }, + { + { + { 0,0,1,3, { 0x00FC,0x00E4,0x00F6,0x0000 } }, + { 0,0,1,0, { 0x0000 } }, + { 0,0,1,3, { 0x0000 } }, + } + } + }, + { /*----------------- END -----------------*/ + is_last: 1 + } + } + }, + + { + { Tmbsrtowcs, TST_LOC_enUS }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, "ABC", 4, 0,0 }, + { 1, "ABC", 3, 0,0 }, + { 1, "ABC", 2, 0,0 }, + } + }, + { + { + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,2, { 0x0041,0x0042,0x0043,0x0000 } }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, "ABC", 4, 0,0 }, + { 1, "", 1, 0,0 }, + { 0, "ABC", 4, 0,0 }, + } + }, + { + { + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,0, { 0x0000 } }, + { 0,0,1,3, { 0x0000 } }, + } + } + }, + { /*----------------- END -----------------*/ + is_last: 1 + } + } + }, + + { + { Tmbsrtowcs, TST_LOC_eucJP }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, "\244\242\244\244\244\246ABC", 7, 0,0 }, + { 1, "\244\242\244\244\244\246ABC", 6, 0,0 }, + { 1, "\244\242\244\244\244\246ABC", 4, 0,0 }, + } + }, + { + { + { 0,0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }}, + { 0,0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }}, + { 0,0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, "\244\242\244\244\244\246ABC", 7, 0,0 }, + { 1, "", 1, 0,0 }, + { 0, "\244\242\244\244\244\246ABC", 7, 0,0 }, + } + }, + { + { + { 0,0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }}, + { 0,0,1,0, { 0x0000 } }, + { 0,0,1,6, { 0x0000 } }, + } + } + }, + { /*----------------- END -----------------*/ + is_last: 1 + } + } + }, + { + { Tmbsrtowcs, TST_LOC_end } + } +}; diff --git a/localedata/tests-mbwc/dat_mbstowcs.c b/localedata/tests-mbwc/dat_mbstowcs.c new file mode 100644 index 0000000000..67a621682b --- /dev/null +++ b/localedata/tests-mbwc/dat_mbstowcs.c @@ -0,0 +1,129 @@ +/* + * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY + * + * FILE: dat_mbstowcs.c + * + * MBSTOWCS: size_t mbstowcs (wchar_t *ws, char *s, size_t n); + */ + +#include <limits.h> + +TST_MBSTOWCS tst_mbstowcs_loc [] = { + { + { Tmbstowcs, TST_LOC_de }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, 1, "ABC", 4 }, + { 1, 1, "ABC", 3 }, + { 1, 1, "ABC", 2 }, + } + }, + { + { + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,2, { 0x0041,0x0042,0x0043,0x0000 } }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, 1, "ABC", 4 }, + { 1, 1, "", 1 }, + { 0, 1, "ABC", 4 }, + } + }, + { + { + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,0, { 0x0000 } }, + { 0,0,1,3, { 0x0000 } }, + } + } + }, + { is_last: 1 } + } + }, + { + { Tmbstowcs, TST_LOC_enUS }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, 1, "ABC", 4 }, + { 1, 1, "ABC", 3 }, + { 1, 1, "ABC", 2 }, + } + }, + { + { + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,2, { 0x0041,0x0042,0x0043,0x0000 } }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, 1, "ABC", 4 }, + { 1, 1, "", 1 }, + { 0, 1, "ABC", 4 }, + } + }, + { + { + { 0,0,1,3, { 0x0041,0x0042,0x0043,0x0000 } }, + { 0,0,1,0, { 0x0000 } }, + { 0,0,1,3, { 0x0000 } }, + } + } + }, + { is_last: 1 } + } + }, + { + { Tmbstowcs, TST_LOC_eucJP }, + { + { /*----------------- #01 -----------------*/ + { + { + { 1, 1, "\244\242\244\244\244\246ABC", 7 }, + { 1, 1, "\244\242\244\244\244\246ABC", 6 }, + { 1, 1, "\244\242\244\244\244\246ABC", 4 }, + } + }, + { + { + { 0,0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }}, + { 0,0,1,6, { 0x3042,0x3044,0x3046,0x0041,0x0042,0x0043,0x0000 }}, + { 0,0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } }, + } + } + }, + { /*----------------- #02 -----------------*/ + { + { + { 1, 1, "\244\242\244\244\244\246ABC", 7 }, + { 1, 1, "", 1 }, + { 0, 1, "\244\242\244\244\244\246ABC", 7 }, + } + }, + { + { + { 0,0,1,4, { 0x3042,0x3044,0x3046,0x0041,0x0000 } }, + { 0,0,1,0, { 0x0000 } }, + { 0,0,1,6, { 0x0000 } }, + } + } + }, + { is_last: 1 } + } + }, + { + { Tmbstowcs, TST_LOC_end } + } +}; diff --git a/localedata/tests-mbwc/dat_wcrtomb.c b/localedata/tests-mbwc/dat_wcrtomb.c new file mode 100644 index 0000000000..529232396f --- /dev/null +++ b/localedata/tests-mbwc/dat_wcrtomb.c @@ -0,0 +1,93 @@ +/* + * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY + * + * FILE: dat_wcrtomb.c + * + * WCRTOMB: intwcrtomb (char *s, wchar_t wc, mbstate_t *ps); + * + */ + +TST_WCRTOMB tst_wcrtomb_loc [] = { + { + { Twcrtomb, TST_LOC_de }, + { + /* #01 : normal case */ + { /*input.*/ { 1, 0x00FC, 0,0 }, + /*expect*/ { 1,0, 1,1, "ü" }, + }, + /* #02 : normal case */ + { /*input.*/ { 1, 0x00D6, 0,0 }, + /*expect*/ { 1,0, 1,1, "Ö" }, + }, + /* #03 : error case */ + { /*input.*/ { 1, 0xFFA1, 0,0 }, + /*expect*/ { 1, EILSEQ,1,-1, "" }, + }, + /* #04 : */ + { /*input.*/ { 0, 0x0041, 0,0 }, + /*expect*/ { 1,0, 1,1, "" }, + }, + /* #05 : */ + { /*input.*/ { 0, 0x0092, 0,0 }, + /*expect*/ { 1,0, 1,1, "" }, + }, + { is_last: 1 } + } + }, + { + { Twcrtomb, TST_LOC_enUS }, + { + /* #01 : normal case */ + { /*input.*/ { 1, 0x0041, 0,0 }, + /*expect*/ { 0,0, 1,1, "A" }, + }, + /* #02 : normal case */ + { /*input.*/ { 1, 0x0042, 0,0 }, + /*expect*/ { 0,0, 1,1, "B" }, + }, + /* #03 : error case */ + /* <WAIVER> x 2 */ + { /*input.*/ { 1, 0x0092, 0,0 }, /* assume ascii */ + /*expect*/ { 1, EILSEQ,1,-1, "" }, + }, + /* #04 : */ + { /*input.*/ { 0, 0x0041, 0,0 }, + /*expect*/ { 1,0, 1,1, "" }, + }, + /* #05 : */ + { /*input.*/ { 0, 0x0092, 0,0 }, + /*expect*/ { 1,0, 1,1, "" }, + }, + { is_last: 1 } + } + }, + { + { Twcrtomb, TST_LOC_eucJP }, + { + /* #01 : normal case */ + { /*input.*/ { 1, 0x3042, 0,0 }, + /*expect*/ { 0,0, 1,2, "\244\242" }, + }, + /* #02 : normal case */ + { /*input.*/ { 1, 0x3044, 0,0 }, + /*expect*/ { 0,0, 1,2, "\244\244" }, + }, + /* #03 : normal case */ + { /*input.*/ { 1, 0x008E, 0,0 }, + /*expect*/ { 1,EILSEQ, 1,-1, "" }, + }, + /* #04 : */ + { /*input.*/ { 0, 0x3042, 0,0 }, + /*expect*/ { 1,0, 0,0, "" }, + }, + /* #05 : */ + { /*input.*/ { 0, 0x008E, 0,0 }, + /*expect*/ { 1,0, 0,0, "" }, + }, + { is_last: 1 } + } + }, + { + { Twcrtomb, TST_LOC_end } + } +}; diff --git a/localedata/tests-mbwc/dat_wcsrtombs.c b/localedat |
