From 01af8501b992896a5fff38da365896b7708cc705 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Fri, 8 Feb 2008 08:45:31 +0000 Subject: [PATCH] user32: Make the listbox tests pass in directories other than dlls/user32/tests. --- dlls/user32/tests/listbox.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 3645190c52a..18b79515c87 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -559,6 +559,11 @@ static void test_listbox_LB_DIR() char pathBuffer[MAX_PATH]; char * p; char driveletter; + HANDLE file; + + file = CreateFileA( "wtest1.tmp.c", FILE_ALL_ACCESS, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d", GetLastError()); + CloseHandle( file ); /* NOTE: for this test to succeed, there must be no subdirectories under the current directory. In addition, there must be at least @@ -965,6 +970,8 @@ static void test_listbox_LB_DIR() ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); } DestroyWindow(hList); + + DeleteFileA( "wtest1.tmp.c" ); } HWND g_listBox; @@ -1045,6 +1052,11 @@ static void test_listbox_dlgdir(void) char tempBuffer[MAX_PATH]; char * p; char driveletter; + HANDLE file; + + file = CreateFileA( "wtest1.tmp.c", FILE_ALL_ACCESS, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); + ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d", GetLastError()); + CloseHandle( file ); /* NOTE: for this test to succeed, there must be no subdirectories under the current directory. In addition, there must be at least @@ -1436,6 +1448,8 @@ static void test_listbox_dlgdir(void) } } DestroyWindow(hWnd); + + DeleteFileA( "wtest1.tmp.c" ); } START_TEST(listbox)