Reece H. Dunn : user32: Make the listbox tests pass in directories other than dlls/user32/tests.

Alexandre Julliard julliard at winehq.org
Fri Feb 8 06:20:15 CST 2008


Module: wine
Branch: master
Commit: 01af8501b992896a5fff38da365896b7708cc705
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=01af8501b992896a5fff38da365896b7708cc705

Author: Reece H. Dunn <msclrhd at hotmail.com>
Date:   Fri Feb  8 08:45:31 2008 +0000

user32: Make the listbox tests pass in directories other than dlls/user32/tests.

---

 dlls/user32/tests/listbox.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c
index 3645190..18b7951 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)




More information about the wine-cvs mailing list