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: test1.c
8**
9** Purpose: Tests that GetACP returns the expected default code page.
10**
11**
12**==========================================================================*/
13
14
15#include <palsuite.h>
16
17/*
18 * NOTE: We only support code page 65001 (UTF-8).
19 */
20
21#define EXPECTED_CP 65001
22
23int __cdecl main(int argc, char *argv[])
24{
25 int ret;
26
27 if (PAL_Initialize(argc, argv))
28 {
29 return FAIL;
30 }
31
32 ret = GetACP();
33 if (ret != EXPECTED_CP)
34 {
35 Fail("ERROR: got incorrect result for current ANSI code page!\n"
36 "Expected %d, got %d\n", EXPECTED_CP, ret);
37 }
38
39 PAL_Terminate();
40 return PASS;
41}
42
43