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
35c65edc
Commit
35c65edc
authored
Oct 25, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Workaround some broken Windows behavior in console tests.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48105
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
7bfa058a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
console.c
dlls/kernel32/tests/console.c
+10
-4
No files found.
dlls/kernel32/tests/console.c
View file @
35c65edc
...
...
@@ -925,10 +925,16 @@ static void testScreenBuffer(HANDLE hConOut)
SetConsoleCursorPosition
(
hConOutRW
,
c
);
ret
=
WriteConsoleA
(
hConOutRW
,
test_cp866
,
lstrlenA
(
test_cp866
),
&
len
,
NULL
);
ok
(
ret
&&
len
==
lstrlenA
(
test_cp866
),
"WriteConsoleA failed
\n
"
);
ret
=
ReadConsoleOutputCharacterW
(
hConOutRW
,
str_wbuf
,
lstrlenA
(
test_cp866
),
c
,
&
len
);
ok
(
ret
&&
len
==
lstrlenA
(
test_cp866
),
"ReadConsoleOutputCharacterW failed
\n
"
);
str_wbuf
[
lstrlenA
(
test_cp866
)]
=
0
;
ok
(
!
lstrcmpW
(
str_wbuf
,
test_unicode
),
"string does not match the pattern
\n
"
);
ret
=
ReadConsoleOutputCharacterW
(
hConOutRW
,
str_wbuf
,
lstrlenW
(
test_unicode
),
c
,
&
len
);
/* Work around some broken results under Windows with some locale (ja, cn, ko...)
* Looks like a real bug in Win10 (at least).
*/
if
(
ret
&&
broken
(
len
==
lstrlenW
(
test_unicode
)
/
sizeof
(
WCHAR
)))
ret
=
ReadConsoleOutputCharacterW
(
hConOutRW
,
str_wbuf
,
lstrlenW
(
test_unicode
)
*
sizeof
(
WCHAR
),
c
,
&
len
);
ok
(
ret
,
"ReadConsoleOutputCharacterW failed
\n
"
);
ok
(
len
==
lstrlenW
(
test_unicode
),
"unexpected len %lu %u
\n
"
,
len
,
lstrlenW
(
test_unicode
));
ok
(
!
memcmp
(
str_wbuf
,
test_unicode
,
lstrlenW
(
test_unicode
)
*
sizeof
(
WCHAR
)),
"string does not match the pattern
\n
"
);
/*
* cp866 is OK, let's switch to cp1251.
...
...
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