summaryrefslogtreecommitdiff
path: root/tests/test-mbrtowc.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:41:36 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:41:36 +0200
commit6b73edd95d603e27d55d4905134ac1327d426534 (patch)
treee0b9334e2637f17696c796ac13b2c39294bf9233 /tests/test-mbrtowc.c
parent0250cb64565a7d5238bbc751225d4b0236ef8316 (diff)
New upstream version 0.9.7upstream/0.9.7
Diffstat (limited to 'tests/test-mbrtowc.c')
-rw-r--r--tests/test-mbrtowc.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/test-mbrtowc.c b/tests/test-mbrtowc.c
index d24b93e7..f7fed6a6 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;