diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-03-27 21:42:03 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-03-27 21:42:03 +0200 |
commit | db6f1f397f45ccd3c11d16352ed46a9c1eae3442 (patch) | |
tree | e0b9334e2637f17696c796ac13b2c39294bf9233 /tests/test-mbrtowc.c | |
parent | 0250cb64565a7d5238bbc751225d4b0236ef8316 (diff) | |
parent | 6b73edd95d603e27d55d4905134ac1327d426534 (diff) |
Merge tag 'upstream/0.9.7'
Upstream version 0.9.7
Diffstat (limited to 'tests/test-mbrtowc.c')
-rw-r--r-- | tests/test-mbrtowc.c | 13 |
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; |