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
c6e10496
Commit
c6e10496
authored
Jan 27, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Jan 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add tests for the TRUE pathway of GetCurrentConsoleFont.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2c575634
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
console.c
dlls/kernel32/tests/console.c
+26
-0
No files found.
dlls/kernel32/tests/console.c
View file @
c6e10496
...
...
@@ -2606,6 +2606,14 @@ static void test_GetCurrentConsoleFont(HANDLE std_output)
memset
(
&
cfi
,
0
,
sizeof
(
CONSOLE_FONT_INFO
));
SetLastError
(
0xdeadbeef
);
ret
=
GetCurrentConsoleFont
(
NULL
,
TRUE
,
&
cfi
);
ok
(
!
ret
,
"got %d, expected 0
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
ok
(
!
cfi
.
dwFontSize
.
X
,
"got %d, expected 0
\n
"
,
cfi
.
dwFontSize
.
X
);
ok
(
!
cfi
.
dwFontSize
.
Y
,
"got %d, expected 0
\n
"
,
cfi
.
dwFontSize
.
Y
);
memset
(
&
cfi
,
0
,
sizeof
(
CONSOLE_FONT_INFO
));
SetLastError
(
0xdeadbeef
);
ret
=
GetCurrentConsoleFont
(
GetStdHandle
(
STD_INPUT_HANDLE
),
FALSE
,
&
cfi
);
ok
(
!
ret
,
"got %d, expected 0
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
...
...
@@ -2614,6 +2622,14 @@ static void test_GetCurrentConsoleFont(HANDLE std_output)
memset
(
&
cfi
,
0
,
sizeof
(
CONSOLE_FONT_INFO
));
SetLastError
(
0xdeadbeef
);
ret
=
GetCurrentConsoleFont
(
GetStdHandle
(
STD_INPUT_HANDLE
),
TRUE
,
&
cfi
);
ok
(
!
ret
,
"got %d, expected 0
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
ok
(
!
cfi
.
dwFontSize
.
X
,
"got %d, expected 0
\n
"
,
cfi
.
dwFontSize
.
X
);
ok
(
!
cfi
.
dwFontSize
.
Y
,
"got %d, expected 0
\n
"
,
cfi
.
dwFontSize
.
Y
);
memset
(
&
cfi
,
0
,
sizeof
(
CONSOLE_FONT_INFO
));
SetLastError
(
0xdeadbeef
);
ret
=
GetCurrentConsoleFont
(
std_output
,
FALSE
,
&
cfi
);
ok
(
ret
,
"got %d, expected non-zero
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %u, expected 0xdeadbeef
\n
"
,
GetLastError
());
...
...
@@ -2625,6 +2641,16 @@ static void test_GetCurrentConsoleFont(HANDLE std_output)
"got %d, expected %d
\n
"
,
cfi
.
dwFontSize
.
X
,
width
);
ok
(
cfi
.
dwFontSize
.
Y
==
height
||
cfi
.
dwFontSize
.
Y
==
c
.
Y
/* Vista and higher */
,
"got %d, expected %d
\n
"
,
cfi
.
dwFontSize
.
Y
,
height
);
memset
(
&
cfi
,
0
,
sizeof
(
CONSOLE_FONT_INFO
));
SetLastError
(
0xdeadbeef
);
ret
=
GetCurrentConsoleFont
(
std_output
,
TRUE
,
&
cfi
);
ok
(
ret
,
"got %d, expected non-zero
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %u, expected 0xdeadbeef
\n
"
,
GetLastError
());
ok
(
cfi
.
dwFontSize
.
X
==
csbi
.
dwMaximumWindowSize
.
X
,
"got %d, expected %d
\n
"
,
cfi
.
dwFontSize
.
X
,
csbi
.
dwMaximumWindowSize
.
X
);
ok
(
cfi
.
dwFontSize
.
Y
==
csbi
.
dwMaximumWindowSize
.
Y
,
"got %d, expected %d
\n
"
,
cfi
.
dwFontSize
.
Y
,
csbi
.
dwMaximumWindowSize
.
Y
);
}
static
void
test_GetConsoleFontSize
(
HANDLE
std_output
)
...
...
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