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 vfprintf function. Tests the wide char
10** specifier (%C).
11**
12**
13**==========================================================================*/
14
15
16
17#include <palsuite.h>
18#include "../vfprintf.h"
19
20
21
22int __cdecl main(int argc, char *argv[])
23{
24 WCHAR wb = (WCHAR) 'b';
25
26 if (PAL_Initialize(argc, argv))
27 {
28 return FAIL;
29 }
30
31
32 DoWCharTest("foo %C", wb, "foo b");
33 DoWCharTest("foo %hC", wb, "foo b");
34 DoCharTest("foo %lC", 'c', "foo c");
35 DoWCharTest("foo %LC", wb, "foo b");
36 DoWCharTest("foo %I64C", wb, "foo b");
37 DoWCharTest("foo %5C", wb, "foo b");
38 DoWCharTest("foo %.0C", wb, "foo b");
39 DoWCharTest("foo %-5C", wb, "foo b ");
40 DoWCharTest("foo %05C", wb, "foo 0000b");
41 DoWCharTest("foo % C", wb, "foo b");
42 DoWCharTest("foo %#C", wb, "foo b");
43
44 PAL_Terminate();
45 return PASS;
46}
47
48