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: test7.c
8**
9** Purpose: Test #7 for the vsprintf function.
10**
11**
12**===================================================================*/
13
14#include <palsuite.h>
15#include "../vsprintf.h"
16/*
17 * Notes: memcmp is used, as is strlen.
18 */
19
20
21int __cdecl main(int argc, char *argv[])
22{
23 WCHAR wb = (WCHAR) 'b';
24
25 if (PAL_Initialize(argc, argv) != 0)
26 {
27 return(FAIL);
28 }
29
30 DoWCharTest("foo %c", wb, "foo b");
31 DoWCharTest("foo %hc", wb, "foo b");
32 DoCharTest("foo %lc", 'c', "foo c");
33 DoWCharTest("foo %Lc", wb, "foo b");
34 DoWCharTest("foo %I64c", wb, "foo b");
35 DoWCharTest("foo %5c", wb, "foo b");
36 DoWCharTest("foo %.0c", wb, "foo b");
37 DoWCharTest("foo %-5c", wb, "foo b ");
38 DoWCharTest("foo %05c", wb, "foo 0000b");
39 DoWCharTest("foo % c", wb, "foo b");
40 DoWCharTest("foo %#c", wb, "foo b");
41
42 PAL_Terminate();
43 return PASS;
44}
45