From 6b73edd95d603e27d55d4905134ac1327d426534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 27 Mar 2017 21:41:36 +0200 Subject: New upstream version 0.9.7 --- tests/test-mbrtowc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests/test-mbrtowc.c') diff --git a/tests/test-mbrtowc.c b/tests/test-mbrtowc.c index d24b93e..f7fed6a 100644 --- a/tests/test-mbrtowc.c +++ b/tests/test-mbrtowc.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -72,6 +72,10 @@ main (int argc, char *argv[]) for (c = 0; c < 0x100; c++) switch (c) { + default: + if (! (c && 1 < argc && argv[1][0] == '5')) + break; + /* Fall through. */ case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': @@ -93,7 +97,8 @@ main (int argc, char *argv[]) case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': - /* c is in the ISO C "basic character set". */ + /* c is in the ISO C "basic character set", or argv[1] starts + with '5' so we are testing all nonnull bytes. */ buf[0] = c; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, buf, 1, &state); @@ -334,6 +339,10 @@ main (int argc, char *argv[]) ASSERT (mbsinit (&state)); } return 0; + + case '5': + /* C locale; tested above. */ + return 0; } return 1; -- cgit v1.2.3