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
95f8270b
Commit
95f8270b
authored
Aug 17, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Aug 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add tests for GetConsoleScreenBufferInfoEx.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1def1e2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
console.c
dlls/kernel32/tests/console.c
+50
-0
No files found.
dlls/kernel32/tests/console.c
View file @
95f8270b
...
...
@@ -2938,6 +2938,55 @@ static void test_SetConsoleFont(HANDLE std_output)
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
}
static
void
test_GetConsoleScreenBufferInfoEx
(
HANDLE
std_output
)
{
HANDLE
hmod
;
BOOL
(
WINAPI
*
pGetConsoleScreenBufferInfoEx
)(
HANDLE
,
CONSOLE_SCREEN_BUFFER_INFOEX
*
);
CONSOLE_SCREEN_BUFFER_INFOEX
csbix
;
BOOL
ret
;
HANDLE
std_input
=
GetStdHandle
(
STD_INPUT_HANDLE
);
hmod
=
GetModuleHandleA
(
"kernel32.dll"
);
pGetConsoleScreenBufferInfoEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"GetConsoleScreenBufferInfoEx"
);
if
(
!
pGetConsoleScreenBufferInfoEx
)
{
win_skip
(
"GetConsoleScreenBufferInfoEx is not available
\n
"
);
return
;
}
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
NULL
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_input
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_output
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
csbix
.
cbSize
=
sizeof
(
CONSOLE_SCREEN_BUFFER_INFOEX
);
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
NULL
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_input
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_output
,
&
csbix
);
todo_wine
ok
(
ret
,
"got %d, expected non-zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %u, expected 0xdeadbeef
\n
"
,
GetLastError
());
}
START_TEST
(
console
)
{
static
const
char
font_name
[]
=
"Lucida Console"
;
...
...
@@ -3086,4 +3135,5 @@ START_TEST(console)
test_GetLargestConsoleWindowSize
(
hConOut
);
test_GetConsoleFontInfo
(
hConOut
);
test_SetConsoleFont
(
hConOut
);
test_GetConsoleScreenBufferInfoEx
(
hConOut
);
}
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