mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 00:31:08 +00:00
366cff4d8f
Reported by Dirk Laessig <d.laessig@tu-bs.de>. * stdio-common/tst-wc-printf.c: New file. Test for %S and %C format. * stdio-common/Makefile (tests): Add tst-wc-printf.
23 lines
331 B
C
23 lines
331 B
C
#define _GNU_SOURCE 1
|
|
#include <wchar.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <wctype.h>
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
wchar_t tmp[3];
|
|
tmp[0] = '8';
|
|
tmp[1] = '1';
|
|
tmp[2] = 0;
|
|
|
|
printf ("Test for wide character output with printf\n");
|
|
|
|
printf ("with %%S: %S\n", tmp);
|
|
|
|
printf ("with %%C: %C\n", tmp[0]);
|
|
|
|
return 0;
|
|
}
|