aboutsummaryrefslogtreecommitdiffstats
path: root/libio/tst-sscanf.c
blob: fb4be34b77a00c005a337e3ece7beffe05f155f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <wchar.h>

#define WCS_LENGTH 256

static int
do_test (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;
}

#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"