1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00
* libio/Makefile (tests): Add tst-sscanf.
	* libio/tst-sscanf.c: New file.
This commit is contained in:
Ulrich Drepper
2001-08-22 18:40:06 +00:00
parent bed381426f
commit c7509e31d1
3 changed files with 24 additions and 1 deletions

20
libio/tst-sscanf.c Normal file
View File

@@ -0,0 +1,20 @@
#include <stdio.h>
#include <wchar.h>
#define WCS_LENGTH 256
int
main (void)
{
const char cnv[] ="%l[abc]";
const char str[] = "abbcXab";
wchar_t wcs[WCS_LENGTH];
int result = 0;
sscanf (str, cnv, wcs);
printf ("wcs = \"%ls\"\n", wcs);
fflush (stdout);
result = wcscmp (wcs, L"abbc") != 0;
return result;
}