| 1 | // Licensed to the .NET Foundation under one or more agreements. |
| 2 | // The .NET Foundation licenses this file to you under the MIT license. |
| 3 | // See the LICENSE file in the project root for more information. |
| 4 | |
| 5 | /*============================================================================ |
| 6 | ** |
| 7 | ** Source: test11.c |
| 8 | ** |
| 9 | ** Purpose: Tests swscanf with strings |
| 10 | ** |
| 11 | ** |
| 12 | **==========================================================================*/ |
| 13 | |
| 14 | |
| 15 | |
| 16 | #include <palsuite.h> |
| 17 | #include "../swscanf.h" |
| 18 | |
| 19 | int __cdecl main(int argc, char *argv[]) |
| 20 | { |
| 21 | if (PAL_Initialize(argc, argv)) |
| 22 | { |
| 23 | return FAIL; |
| 24 | } |
| 25 | |
| 26 | DoWStrTest(convert("foo bar" ), convert("foo %s" ), convert("bar" )); |
| 27 | DoWStrTest(convert("foo bar" ), convert("foo %2s" ), convert("ba" )); |
| 28 | DoStrTest(convert("foo bar" ), convert("foo %hs" ), "bar" ); |
| 29 | DoWStrTest(convert("foo bar" ), convert("foo %ls" ), convert("bar" )); |
| 30 | DoWStrTest(convert("foo bar" ), convert("foo %Ls" ), convert("bar" )); |
| 31 | DoWStrTest(convert("foo bar" ), convert("foo %I64s" ), convert("bar" )); |
| 32 | |
| 33 | PAL_Terminate(); |
| 34 | return PASS; |
| 35 | } |
| 36 | |