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
b1dc5a53
Commit
b1dc5a53
authored
Mar 17, 2023
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Check return length of GetConsoleOriginalTitleA/W().
parent
9a49c0a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
console.c
dlls/kernel32/tests/console.c
+9
-4
No files found.
dlls/kernel32/tests/console.c
View file @
b1dc5a53
...
...
@@ -4227,9 +4227,9 @@ static void test_SetConsoleScreenBufferInfoEx(HANDLE std_output)
static
void
test_GetConsoleOriginalTitleA
(
void
)
{
char
buf
[
64
];
DWORD
ret
;
char
title
[]
=
"Original Console Title"
;
char
buf
[
64
];
DWORD
ret
,
title_len
=
strlen
(
title
);
ret
=
GetConsoleOriginalTitleA
(
NULL
,
0
);
ok
(
!
ret
,
"Unexpected string length; error %lu
\n
"
,
GetLastError
());
...
...
@@ -4240,6 +4240,7 @@ static void test_GetConsoleOriginalTitleA(void)
ret
=
GetConsoleOriginalTitleA
(
buf
,
ARRAY_SIZE
(
buf
));
todo_wine
ok
(
ret
,
"GetConsoleOriginalTitleA failed: %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
title
),
"got %s, expected %s
\n
"
,
wine_dbgstr_a
(
buf
),
wine_dbgstr_a
(
title
));
todo_wine
ok
(
ret
==
title_len
,
"got %lu, expected %lu
\n
"
,
ret
,
title_len
);
ret
=
SetConsoleTitleA
(
"test"
);
ok
(
ret
,
"SetConsoleTitleA failed: %lu
\n
"
,
GetLastError
());
...
...
@@ -4247,13 +4248,14 @@ static void test_GetConsoleOriginalTitleA(void)
ret
=
GetConsoleOriginalTitleA
(
buf
,
ARRAY_SIZE
(
buf
));
todo_wine
ok
(
ret
,
"GetConsoleOriginalTitleA failed: %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buf
,
title
),
"got %s, expected %s
\n
"
,
wine_dbgstr_a
(
buf
),
wine_dbgstr_a
(
title
));
todo_wine
ok
(
ret
==
title_len
,
"got %lu, expected %lu
\n
"
,
ret
,
title_len
);
}
static
void
test_GetConsoleOriginalTitleW
(
void
)
{
WCHAR
buf
[
64
];
DWORD
ret
;
WCHAR
title
[]
=
L"Original Console Title"
;
WCHAR
buf
[
64
];
DWORD
ret
,
title_len
=
lstrlenW
(
title
);
ret
=
GetConsoleOriginalTitleW
(
NULL
,
0
);
ok
(
!
ret
,
"Unexpected string length; error %lu
\n
"
,
GetLastError
());
...
...
@@ -4265,6 +4267,7 @@ static void test_GetConsoleOriginalTitleW(void)
todo_wine
ok
(
ret
,
"GetConsoleOriginalTitleW failed: %lu
\n
"
,
GetLastError
());
buf
[
ret
]
=
0
;
todo_wine
ok
(
!
wcscmp
(
buf
,
title
),
"got %s, expected %s
\n
"
,
wine_dbgstr_w
(
buf
),
wine_dbgstr_w
(
title
));
todo_wine
ok
(
ret
==
title_len
,
"got %lu, expected %lu
\n
"
,
ret
,
title_len
);
ret
=
SetConsoleTitleW
(
L"test"
);
ok
(
ret
,
"SetConsoleTitleW failed: %lu
\n
"
,
GetLastError
());
...
...
@@ -4272,10 +4275,12 @@ static void test_GetConsoleOriginalTitleW(void)
ret
=
GetConsoleOriginalTitleW
(
buf
,
ARRAY_SIZE
(
buf
));
todo_wine
ok
(
ret
,
"GetConsoleOriginalTitleW failed: %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
!
wcscmp
(
buf
,
title
),
"got %s, expected %s
\n
"
,
wine_dbgstr_w
(
buf
),
wine_dbgstr_w
(
title
));
todo_wine
ok
(
ret
==
title_len
,
"got %lu, expected %lu
\n
"
,
ret
,
title_len
);
ret
=
GetConsoleOriginalTitleW
(
buf
,
5
);
todo_wine
ok
(
ret
,
"GetConsoleOriginalTitleW failed: %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
!
wcscmp
(
buf
,
L"Orig"
),
"got %s, expected 'Orig'
\n
"
,
wine_dbgstr_w
(
buf
));
todo_wine
ok
(
ret
==
title_len
,
"got %lu, expected %lu
\n
"
,
ret
,
title_len
);
}
static
void
test_GetConsoleOriginalTitle
(
void
)
...
...
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