Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
17777c84
Commit
17777c84
authored
Jul 15, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement GEO_PARENT for GetGeoInfo().
parent
805da6bf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
locale.c
dlls/kernel32/locale.c
+0
-0
locale.c
dlls/kernel32/tests/locale.c
+64
-0
No files found.
dlls/kernel32/locale.c
View file @
17777c84
This diff is collapsed.
Click to expand it.
dlls/kernel32/tests/locale.c
View file @
17777c84
...
...
@@ -92,6 +92,7 @@ static INT (WINAPI *pCompareStringEx)(LPCWSTR, DWORD, LPCWSTR, INT, LPCWSTR, INT
LPNLSVERSIONINFO
,
LPVOID
,
LPARAM
);
static
INT
(
WINAPI
*
pGetGeoInfoA
)(
GEOID
,
GEOTYPE
,
LPSTR
,
INT
,
LANGID
);
static
INT
(
WINAPI
*
pGetGeoInfoW
)(
GEOID
,
GEOTYPE
,
LPWSTR
,
INT
,
LANGID
);
static
BOOL
(
WINAPI
*
pEnumSystemGeoID
)(
GEOCLASS
,
GEOID
,
GEO_ENUMPROC
);
static
void
InitFunctionPointers
(
void
)
{
...
...
@@ -117,6 +118,7 @@ static void InitFunctionPointers(void)
X
(
CompareStringEx
);
X
(
GetGeoInfoA
);
X
(
GetGeoInfoW
);
X
(
EnumSystemGeoID
);
#undef X
}
...
...
@@ -3896,6 +3898,17 @@ static void test_GetGeoInfo(void)
ok
(
ret
==
4
,
"got %d
\n
"
,
ret
);
ok
(
!
strcmp
(
buffA
,
"203"
),
"got %s
\n
"
,
buffA
);
/* GEO_PARENT */
buffA
[
0
]
=
0
;
ret
=
pGetGeoInfoA
(
203
,
GEO_PARENT
,
buffA
,
20
,
0
);
if
(
ret
==
0
)
win_skip
(
"GEO_PARENT not supported.
\n
"
);
else
{
ok
(
ret
==
6
,
"got %d
\n
"
,
ret
);
ok
(
!
strcmp
(
buffA
,
"47609"
),
"got %s
\n
"
,
buffA
);
}
buffA
[
0
]
=
0
;
ret
=
pGetGeoInfoA
(
203
,
GEO_ISO_UN_NUMBER
,
buffA
,
20
,
0
);
if
(
ret
==
0
)
...
...
@@ -3913,6 +3926,56 @@ static void test_GetGeoInfo(void)
ok
(
GetLastError
()
==
ERROR_INVALID_FLAGS
,
"got %d
\n
"
,
GetLastError
());
}
static
int
geoidenum_count
;
static
BOOL
CALLBACK
test_geoid_enumproc
(
GEOID
geoid
)
{
INT
ret
=
pGetGeoInfoA
(
geoid
,
GEO_ISO2
,
NULL
,
0
,
0
);
todo_wine
{
ok
(
ret
==
3
,
"got %d for %d
\n
"
,
ret
,
geoid
);
/* valid geoid starts at 2 */
ok
(
geoid
>=
2
,
"got geoid %d
\n
"
,
geoid
);
}
return
geoidenum_count
++
<
5
;
}
static
BOOL
CALLBACK
test_geoid_enumproc2
(
GEOID
geoid
)
{
geoidenum_count
++
;
return
TRUE
;
}
static
void
test_EnumSystemGeoID
(
void
)
{
BOOL
ret
;
if
(
!
pEnumSystemGeoID
)
{
win_skip
(
"EnumSystemGeoID is not available.
\n
"
);
return
;
}
SetLastError
(
0xdeadbeef
);
ret
=
pEnumSystemGeoID
(
GEOCLASS_NATION
,
0
,
NULL
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
GetLastError
());
ret
=
pEnumSystemGeoID
(
GEOCLASS_NATION
,
0
,
test_geoid_enumproc
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
geoidenum_count
=
0
;
ret
=
pEnumSystemGeoID
(
GEOCLASS_REGION
,
39070
,
test_geoid_enumproc2
);
if
(
ret
==
0
)
skip
(
"GEOCLASS_REGION is not supported in EnumSystemGeoID.
\n
"
);
else
{
ok
(
ret
&&
geoidenum_count
>
0
,
"got %d, count %d
\n
"
,
ret
,
geoidenum_count
);
geoidenum_count
=
0
;
ret
=
pEnumSystemGeoID
(
GEOCLASS_REGION
,
0
,
test_geoid_enumproc2
);
ok
(
ret
&&
geoidenum_count
>
0
,
"got %d, count %d
\n
"
,
ret
,
geoidenum_count
);
}
}
START_TEST
(
locale
)
{
InitFunctionPointers
();
...
...
@@ -3949,6 +4012,7 @@ START_TEST(locale)
test_IsValidLocaleName
();
test_CompareStringOrdinal
();
test_GetGeoInfo
();
test_EnumSystemGeoID
();
/* this requires collation table patch to make it MS compatible */
if
(
0
)
test_sorting
();
}
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