From 6cc063813e244c2fa13431b7114787f938fc8557 Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Sun, 10 Oct 2010 21:07:53 +0200 Subject: user32/tests: Test FindWindowEx for empty window title --- dlls/user32/tests/win.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 50c5be5..e03b97c 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6237,6 +6237,25 @@ static void test_rtl_layout(void) DestroyWindow( parent ); } +static void test_FindWindowEx(void) +{ + HWND found; + CHAR title[1]; + + title[0] = 0; + + found = FindWindowExA( 0, 0, "MainWindowClass", title ); + ok( found == NULL, "expected a NULL hwnd\n" ); + found = FindWindowExA( 0, 0, "MainWindowClass", NULL ); + ok( found != NULL, "found is NULL, expected a valid hwnd\n" ); + /* test behaviour with a window title that is an empty character */ + found = FindWindowExA( 0, 0, "Shell_TrayWnd", title ); +todo_wine + ok( found != NULL, "found is NULL, expected a valid hwnd\n" ); + found = FindWindowExA( 0, 0, "Shell_TrayWnd", NULL ); + ok( found != NULL, "found is NULL, expected a valid hwnd\n" ); +} + START_TEST(win) { HMODULE user32 = GetModuleHandleA( "user32.dll" ); @@ -6332,6 +6351,7 @@ START_TEST(win) test_Expose(); test_layered_window(); + test_FindWindowEx(); test_SetForegroundWindow(hwndMain); test_shell_window(); test_handles( hwndMain ); -- 1.7.0.4