| 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: GetConsoleOutputCP.c (test 1) |
| 8 | ** |
| 9 | ** Purpose: Tests the PAL implementation of the GetConsoleOutputCP function. |
| 10 | ** |
| 11 | ** |
| 12 | **===================================================================*/ |
| 13 | |
| 14 | #include <palsuite.h> |
| 15 | |
| 16 | |
| 17 | int __cdecl main(int argc, char *argv[]) |
| 18 | { |
| 19 | UINT uiCP = 0; |
| 20 | |
| 21 | if (0 != PAL_Initialize(argc,argv)) |
| 22 | { |
| 23 | return FAIL; |
| 24 | } |
| 25 | |
| 26 | uiCP = GetConsoleOutputCP(); |
| 27 | if ((uiCP != CP_ACP) && (uiCP != GetACP()) && (uiCP != 437)) /*437 for MSDOS*/ |
| 28 | { |
| 29 | Fail("GetConsoleOutputCP: ERROR -> The invalid code page %d was returned.\n" , |
| 30 | uiCP); |
| 31 | } |
| 32 | |
| 33 | PAL_Terminate(); |
| 34 | return PASS; |
| 35 | } |
| 36 | |