From bb9231c8402e9ae99f98a868429e73c6340da304 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Thu, 10 Jul 2008 10:30:28 +0000 Subject: Added missing tests for locale with multibyte encoding --- test/locale-mbwc/tst_wcswidth.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 test/locale-mbwc/tst_wcswidth.c (limited to 'test/locale-mbwc/tst_wcswidth.c') diff --git a/test/locale-mbwc/tst_wcswidth.c b/test/locale-mbwc/tst_wcswidth.c new file mode 100644 index 000000000..c8369753e --- /dev/null +++ b/test/locale-mbwc/tst_wcswidth.c @@ -0,0 +1,39 @@ +/* + WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n); +*/ + +#define TST_FUNCTION wcswidth + +#include "tsp_common.c" +#include "dat_wcswidth.c" + +int +tst_wcswidth (FILE *fp, int debug_flg) +{ + TST_DECL_VARS (int); + wchar_t *ws; + int n; + + TST_DO_TEST (wcswidth) + { + TST_HEAD_LOCALE (wcswidth, S_WCSWIDTH); + TST_DO_REC (wcswidth) + { + TST_GET_ERRET (wcswidth); + ws = TST_INPUT (wcswidth).ws; + n = TST_INPUT (wcswidth).n; + ret = wcswidth (ws, n); + + if (debug_flg) + { + fprintf (stderr, "wcswidth: [ %d ] : ret = %d\n", rec + 1, ret); + } + + TST_IF_RETURN (S_WCSWIDTH) + { + }; + } + } + + return err_count; +} -- cgit v1.2.3