9 wchar_t in
[] = L
"123,abc,321";
10 /* This is the critical part for this test. format must be in
12 static const wchar_t format
[50] = L
"%d,%[^,],%d";
15 printf ("in='%ls' format='%ls'\n", in
, format
);
16 if (swscanf (in
, format
, &out_d1
, out_s
, &out_d2
) != 3)
18 puts ("swscanf did not return 3");
21 printf ("in='%ls' format='%ls'\n", in
, format
);
22 printf ("out_d1=%d out_s='%s' out_d2=%d\n", out_d1
, out_s
, out_d2
);
23 if (out_d1
!= 123 || strcmp (out_s
, "abc") != 0 || out_d2
!= 321)
25 puts ("swscanf did not return the correct values");
31 #define TEST_FUNCTION do_test ()
32 #include "../test-skeleton.c"