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
cfe0f970
Commit
cfe0f970
authored
Aug 03, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Add a test for a CodePageToCodePages failure, make it pass under Wine.
parent
1542bbd8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
30 deletions
+38
-30
mlang.c
dlls/mlang/mlang.c
+4
-4
mlang.c
dlls/mlang/tests/mlang.c
+34
-26
No files found.
dlls/mlang/mlang.c
View file @
cfe0f970
...
...
@@ -1883,7 +1883,6 @@ static HRESULT WINAPI fnIMLangFontLink_CodePageToCodePages(
BOOL
rc
;
TRACE
(
"(%p) Seeking %u
\n
"
,
This
,
uCodePage
);
memset
(
&
cs
,
0
,
sizeof
(
cs
));
rc
=
TranslateCharsetInfo
((
DWORD
*
)
uCodePage
,
&
cs
,
TCI_SRCCODEPAGE
);
...
...
@@ -1891,11 +1890,12 @@ static HRESULT WINAPI fnIMLangFontLink_CodePageToCodePages(
{
*
pdwCodePages
=
cs
.
fs
.
fsCsb
[
0
];
TRACE
(
"resulting CodePages 0x%x
\n
"
,
*
pdwCodePages
);
return
S_OK
;
}
else
TRACE
(
"CodePage Not Found
\n
"
);
return
S_OK
;
TRACE
(
"CodePage Not Found
\n
"
);
*
pdwCodePages
=
0
;
return
E_FAIL
;
}
static
HRESULT
WINAPI
fnIMLangFontLink_CodePagesToCodePage
(
...
...
dlls/mlang/tests/mlang.c
View file @
cfe0f970
...
...
@@ -640,36 +640,44 @@ static void test_EnumScripts(IMultiLanguage2 *iML2, DWORD flags)
static
void
IMLangFontLink_Test
(
IMLangFontLink
*
iMLFL
)
{
DWORD
dwCodePages
=
0
;
DWORD
dwManyCodePages
=
0
;
UINT
CodePage
=
0
;
ok
(
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
932
,
&
dwCodePages
)
==
S_OK
,
"IMLangFontLink_CodePageToCodePages failed
\n
"
);
ok
(
dwCodePages
!=
0
,
"No CodePages returned
\n
"
);
ok
(
IMLangFontLink_CodePagesToCodePage
(
iMLFL
,
dwCodePages
,
1035
,
&
CodePage
)
==
S_OK
,
"IMLangFontLink_CodePagesToCodePage failed
\n
"
);
DWORD
dwCodePages
,
dwManyCodePages
;
UINT
CodePage
;
HRESULT
ret
;
dwCodePages
=
~
0u
;
ret
=
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
-
1
,
&
dwCodePages
);
ok
(
ret
==
E_FAIL
,
"IMLangFontLink_CodePageToCodePages should fail: %x
\n
"
,
ret
);
ok
(
dwCodePages
==
0
,
"expected 0, got %u
\n
"
,
dwCodePages
);
dwCodePages
=
0
;
ret
=
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
932
,
&
dwCodePages
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_CodePageToCodePages error %x
\n
"
,
ret
);
ok
(
dwCodePages
==
FS_JISJAPAN
,
"expected FS_JISJAPAN, got %08x
\n
"
,
dwCodePages
);
CodePage
=
0
;
ret
=
IMLangFontLink_CodePagesToCodePage
(
iMLFL
,
dwCodePages
,
1035
,
&
CodePage
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_CodePagesToCodePage error %x
\n
"
,
ret
);
ok
(
CodePage
==
932
,
"Incorrect CodePage Returned (%i)
\n
"
,
CodePage
);
ok
(
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
1252
,
&
dwCodePages
)
==
S_OK
,
"IMLangFontLink_CodePageToCodePages failed
\n
"
);
dwManyCodePages
=
dwManyCodePages
|
dwCodePages
;
ok
(
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
1256
,
&
dwCodePages
)
==
S_OK
,
"IMLangFontLink_CodePageToCodePages failed
\n
"
);
dwManyCodePages
=
dwManyCodePages
|
dwCodePages
;
ok
(
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
874
,
&
dwCodePages
)
==
S_OK
,
"IMLangFontLink_CodePageToCodePages failed
\n
"
);
dwManyCodePages
=
dwManyCodePages
|
dwCodePages
;
ok
(
IMLangFontLink_CodePagesToCodePage
(
iMLFL
,
dwManyCodePages
,
1256
,
&
CodePage
)
==
S_OK
,
"IMLangFontLink_CodePagesToCodePage failed
\n
"
);
dwManyCodePages
=
0
;
ret
=
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
1252
,
&
dwManyCodePages
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_CodePageToCodePages error %x
\n
"
,
ret
);
ok
(
dwManyCodePages
==
FS_LATIN1
,
"expected FS_LATIN1, got %08x
\n
"
,
dwManyCodePages
);
dwCodePages
=
0
;
ret
=
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
1256
,
&
dwCodePages
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_CodePageToCodePages error %x
\n
"
,
ret
);
ok
(
dwCodePages
==
FS_ARABIC
,
"expected FS_ARABIC, got %08x
\n
"
,
dwCodePages
);
dwManyCodePages
|=
dwCodePages
;
ret
=
IMLangFontLink_CodePageToCodePages
(
iMLFL
,
874
,
&
dwCodePages
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_CodePageToCodePages error %x
\n
"
,
ret
);
ok
(
dwCodePages
==
FS_THAI
,
"expected FS_THAI, got %08x
\n
"
,
dwCodePages
);
dwManyCodePages
|=
dwCodePages
;
ret
=
IMLangFontLink_CodePagesToCodePage
(
iMLFL
,
dwManyCodePages
,
1256
,
&
CodePage
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_CodePagesToCodePage error %x
\n
"
,
ret
);
ok
(
CodePage
==
1256
,
"Incorrect CodePage Returned (%i)
\n
"
,
CodePage
);
ok
(
IMLangFontLink_CodePagesToCodePage
(
iMLFL
,
dwManyCodePages
,
936
,
&
CodePage
)
==
S_OK
,
"IMLangFontLink_CodePagesToCodePage failed
\n
"
);
ret
=
IMLangFontLink_CodePagesToCodePage
(
iMLFL
,
dwManyCodePages
,
936
,
&
CodePage
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_CodePagesToCodePage error %x
\n
"
,
ret
);
ok
(
CodePage
==
1252
,
"Incorrect CodePage Returned (%i)
\n
"
,
CodePage
);
}
...
...
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