Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a894a630
Commit
a894a630
authored
Feb 03, 2017
by
Jactry Zeng
Committed by
Alexandre Julliard
Feb 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add Chinese special tests for LocaleNameToLCID().
Signed-off-by:
Jactry Zeng
<
jzeng@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0e42bce0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
locale.c
dlls/kernel32/tests/locale.c
+44
-0
No files found.
dlls/kernel32/tests/locale.c
View file @
a894a630
...
...
@@ -2705,6 +2705,12 @@ static void test_LocaleNameToLCID(void)
WCHAR
buffer
[
LOCALE_NAME_MAX_LENGTH
];
static
const
WCHAR
enW
[]
=
{
'e'
,
'n'
,
0
};
static
const
WCHAR
esesW
[]
=
{
'e'
,
's'
,
'-'
,
'e'
,
's'
,
0
};
static
const
WCHAR
zhHansW
[]
=
{
'z'
,
'h'
,
'-'
,
'H'
,
'a'
,
'n'
,
's'
,
0
};
static
const
WCHAR
zhhansW
[]
=
{
'z'
,
'h'
,
'-'
,
'h'
,
'a'
,
'n'
,
's'
,
0
};
static
const
WCHAR
zhHantW
[]
=
{
'z'
,
'h'
,
'-'
,
'H'
,
'a'
,
'n'
,
't'
,
0
};
static
const
WCHAR
zhhantW
[]
=
{
'z'
,
'h'
,
'-'
,
'h'
,
'a'
,
'n'
,
't'
,
0
};
static
const
WCHAR
zhcnW
[]
=
{
'z'
,
'h'
,
'-'
,
'C'
,
'N'
,
0
};
static
const
WCHAR
zhhkW
[]
=
{
'z'
,
'h'
,
'-'
,
'H'
,
'K'
,
0
};
if
(
!
pLocaleNameToLCID
)
{
...
...
@@ -2772,6 +2778,44 @@ static void test_LocaleNameToLCID(void)
ptr
++
;
}
/* zh-Hant */
lcid
=
pLocaleNameToLCID
(
zhHantW
,
0
);
todo_wine
ok
(
lcid
==
MAKELCID
(
MAKELANGID
(
LANG_CHINESE
,
SUBLANG_CHINESE_HONGKONG
),
SORT_DEFAULT
),
"%s: got wrong lcid 0x%04x
\n
"
,
wine_dbgstr_w
(
zhHantW
),
lcid
);
ret
=
pLCIDToLocaleName
(
lcid
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
),
0
);
ok
(
ret
>
0
,
"%s: got %d
\n
"
,
wine_dbgstr_w
(
zhHantW
),
ret
);
todo_wine
ok
(
!
lstrcmpW
(
zhhkW
,
buffer
),
"%s: got wrong locale name %s
\n
"
,
wine_dbgstr_w
(
zhHantW
),
wine_dbgstr_w
(
buffer
));
/* zh-hant */
lcid
=
pLocaleNameToLCID
(
zhhantW
,
0
);
todo_wine
ok
(
lcid
==
MAKELCID
(
MAKELANGID
(
LANG_CHINESE
,
SUBLANG_CHINESE_HONGKONG
),
SORT_DEFAULT
),
"%s: got wrong lcid 0x%04x
\n
"
,
wine_dbgstr_w
(
zhhantW
),
MAKELCID
(
MAKELANGID
(
LANG_CHINESE
,
SUBLANG_CHINESE_HONGKONG
),
SORT_DEFAULT
));
ret
=
pLCIDToLocaleName
(
lcid
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
),
0
);
ok
(
ret
>
0
,
"%s: got %d
\n
"
,
wine_dbgstr_w
(
zhhantW
),
ret
);
todo_wine
ok
(
!
lstrcmpW
(
zhhkW
,
buffer
),
"%s: got wrong locale name %s
\n
"
,
wine_dbgstr_w
(
zhhantW
),
wine_dbgstr_w
(
buffer
));
/* zh-Hans */
lcid
=
pLocaleNameToLCID
(
zhHansW
,
0
);
todo_wine
ok
(
lcid
==
MAKELCID
(
MAKELANGID
(
LANG_CHINESE_SIMPLIFIED
,
SUBLANG_CHINESE_SIMPLIFIED
),
SORT_DEFAULT
),
"%s: got wrong lcid 0x%04x
\n
"
,
wine_dbgstr_w
(
zhHansW
),
lcid
);
ret
=
pLCIDToLocaleName
(
lcid
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
),
0
);
ok
(
ret
>
0
,
"%s: got %d
\n
"
,
wine_dbgstr_w
(
zhHansW
),
ret
);
todo_wine
ok
(
!
lstrcmpW
(
zhcnW
,
buffer
),
"%s: got wrong locale name %s
\n
"
,
wine_dbgstr_w
(
zhHansW
),
wine_dbgstr_w
(
buffer
));
/* zh-hans */
lcid
=
pLocaleNameToLCID
(
zhhansW
,
0
);
todo_wine
ok
(
lcid
==
MAKELCID
(
MAKELANGID
(
LANG_CHINESE_SIMPLIFIED
,
SUBLANG_CHINESE_SIMPLIFIED
),
SORT_DEFAULT
),
"%s: got wrong lcid 0x%04x
\n
"
,
wine_dbgstr_w
(
zhhansW
),
MAKELCID
(
MAKELANGID
(
LANG_CHINESE_SIMPLIFIED
,
SUBLANG_CHINESE_SIMPLIFIED
),
SORT_DEFAULT
));
ret
=
pLCIDToLocaleName
(
lcid
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
),
0
);
ok
(
ret
>
0
,
"%s: got %d
\n
"
,
wine_dbgstr_w
(
zhhansW
),
ret
);
todo_wine
ok
(
!
lstrcmpW
(
zhcnW
,
buffer
),
"%s: got wrong locale name %s
\n
"
,
wine_dbgstr_w
(
zhhansW
),
wine_dbgstr_w
(
buffer
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment