mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 11:13:38 +00:00
kernel32/tests: Test GetConsoleOriginalTitleW() with an empty title.
This commit is contained in:
parent
30f1c1be74
commit
d350af2455
|
@ -4283,6 +4283,15 @@ static void test_GetConsoleOriginalTitleW(void)
|
|||
ok(ret == title_len, "got %lu, expected %lu\n", ret, title_len);
|
||||
}
|
||||
|
||||
static void test_GetConsoleOriginalTitleW_empty(void)
|
||||
{
|
||||
WCHAR buf[64];
|
||||
DWORD ret;
|
||||
|
||||
ret = GetConsoleOriginalTitleW(buf, ARRAY_SIZE(buf));
|
||||
ok(!ret, "GetConsoleOriginalTitleW failed: %lu\n", GetLastError());
|
||||
}
|
||||
|
||||
static void test_GetConsoleOriginalTitle(void)
|
||||
{
|
||||
STARTUPINFOA si = { sizeof(si) };
|
||||
|
@ -4299,6 +4308,14 @@ static void test_GetConsoleOriginalTitle(void)
|
|||
CloseHandle(info.hThread);
|
||||
wait_child_process(info.hProcess);
|
||||
CloseHandle(info.hProcess);
|
||||
|
||||
strcat(buf, " empty");
|
||||
title[0] = 0;
|
||||
ret = CreateProcessA(NULL, buf, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &info);
|
||||
ok(ret, "CreateProcess failed: %lu\n", GetLastError());
|
||||
CloseHandle(info.hThread);
|
||||
wait_child_process(info.hProcess);
|
||||
CloseHandle(info.hProcess);
|
||||
}
|
||||
|
||||
static void test_GetConsoleTitleA(void)
|
||||
|
@ -4944,10 +4961,15 @@ START_TEST(console)
|
|||
ExitProcess(exit_code);
|
||||
}
|
||||
|
||||
if (argc == 3 && !strcmp(argv[2], "title_test"))
|
||||
if (argc >= 3 && !strcmp(argv[2], "title_test"))
|
||||
{
|
||||
test_GetConsoleOriginalTitleA();
|
||||
test_GetConsoleOriginalTitleW();
|
||||
if (argc == 3)
|
||||
{
|
||||
test_GetConsoleOriginalTitleA();
|
||||
test_GetConsoleOriginalTitleW();
|
||||
}
|
||||
else
|
||||
test_GetConsoleOriginalTitleW_empty();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue