glibc/localedata/tests-mbwc/dat_mbrtowc.c
Andreas Jaeger 5ca8accdcd 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.
2000-06-29 10:36:12 +00:00

141 lines
2.5 KiB
C

/*
* 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 }
}
};