// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*============================================================================ ** ** Source: test7.c ** ** Purpose: Tests _snprintf with wide characters ** ** **==========================================================================*/ #include #include "../_snprintf.h" /* * Notes: memcmp is used, as is strlen. */ int __cdecl main(int argc, char *argv[]) { WCHAR wb = (WCHAR) 'b'; if (PAL_Initialize(argc, argv) != 0) { return FAIL; } DoWCharTest("foo %C", wb, "foo b"); DoWCharTest("foo %hC", wb, "foo b"); DoCharTest("foo %lC", 'c', "foo c"); DoWCharTest("foo %LC", wb, "foo b"); DoWCharTest("foo %I64C", wb, "foo b"); DoWCharTest("foo %5C", wb, "foo b"); DoWCharTest("foo %.0C", wb, "foo b"); DoWCharTest("foo %-5C", wb, "foo b "); DoWCharTest("foo %05C", wb, "foo 0000b"); DoWCharTest("foo % C", wb, "foo b"); DoWCharTest("foo %#C", wb, "foo b"); PAL_Terminate(); return PASS; }