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