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: test2.c |
8 | ** |
9 | ** Purpose: Tests IsValidCodePage with all the code pages valid on W2K. |
10 | ** |
11 | ** |
12 | **==========================================================================*/ |
13 | |
14 | |
15 | |
16 | #include <palsuite.h> |
17 | |
18 | UINT ValidCodePages[] = |
19 | { |
20 | 0x25, 0x1b5, 0x1f4, 0x352, 0x35c, 0x35d, 0x35f, 0x361, |
21 | 0x36a, 0x3a4, 0x3a8, 0x3b5, 0x3b6, 0x4e2, 0x4e3, 0x4e4, 0x4e5, 0x4e6, |
22 | 0x4e7, 0x4e8, 0x4e9, 0x4ea, 0x2710, 0x275f, 0x4e9f, 0x4f25, 0x5182, 0x6faf, |
23 | 0x6fb0, 0x6fbd, 0xfde8, 0xfde9 |
24 | }; |
25 | |
26 | |
27 | int NumValidPages = sizeof(ValidCodePages) / sizeof(ValidCodePages[0]); |
28 | int __cdecl main(int argc, char *argv[]) |
29 | { |
30 | int i; |
31 | |
32 | if (PAL_Initialize(argc, argv)) |
33 | { |
34 | return FAIL; |
35 | } |
36 | |
37 | for (i=0; i<NumValidPages; i++) |
38 | { |
39 | if (!IsValidCodePage(ValidCodePages[i])) |
40 | { |
41 | Fail("IsValidCodePage() found code page %#x invalid!\n" , |
42 | ValidCodePages[i]); |
43 | } |
44 | } |
45 | |
46 | |
47 | PAL_Terminate(); |
48 | |
49 | return PASS; |
50 | } |
51 | |
52 | |