Include tests for MoveFile[W|A].

This commit is contained in:
Hans Leidekker 2003-12-08 22:21:20 +00:00 committed by Alexandre Julliard
parent c9d42291e8
commit 7499242fd3
1 changed files with 26 additions and 22 deletions

View File

@ -307,7 +307,7 @@ static void test__lcreat( void )
}
void test__llseek( void )
static void test__llseek( void )
{
INT i;
HFILE filehandle;
@ -506,7 +506,7 @@ static void test__lwrite( void )
ok( DeleteFileA( filename ) != 0, "DeleteFile failed (%ld)", GetLastError( ) );
}
void test_CopyFileA(void)
static void test_CopyFileA(void)
{
char temp_path[MAX_PATH];
char source[MAX_PATH], dest[MAX_PATH];
@ -536,7 +536,7 @@ void test_CopyFileA(void)
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
}
void test_CopyFileW(void)
static void test_CopyFileW(void)
{
WCHAR temp_path[MAX_PATH];
WCHAR source[MAX_PATH], dest[MAX_PATH];
@ -568,7 +568,7 @@ void test_CopyFileW(void)
ok(ret, "DeleteFileW: error %ld\n", GetLastError());
}
void test_CreateFileA(void)
static void test_CreateFileA(void)
{
HANDLE hFile;
char temp_path[MAX_PATH];
@ -592,7 +592,7 @@ void test_CreateFileA(void)
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
}
void test_CreateFileW(void)
static void test_CreateFileW(void)
{
HANDLE hFile;
WCHAR temp_path[MAX_PATH];
@ -651,7 +651,7 @@ static void test_DeleteFileW( void )
#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))))
void test_MoveFileA(void)
static void test_MoveFileA(void)
{
char tempdir[MAX_PATH];
char source[MAX_PATH], dest[MAX_PATH];
@ -690,6 +690,7 @@ void test_MoveFileA(void)
ok(!ret, "MoveFileA: shouldn't move to wildcard file");
ok(GetLastError() == ERROR_INVALID_NAME,
"MoveFileA: with wildcards, unexpected error %ld\n", GetLastError());
#if 0
if (ret || (GetLastError() != ERROR_INVALID_NAME))
{
WIN32_FIND_DATAA fd;
@ -707,23 +708,24 @@ void test_MoveFileA(void)
lpName = fd.cAlternateFileName;
if (!lpName[0])
lpName = fd.cFileName;
ok(!IsDotDir(lpName), "MoveFileA: wildcards file created!");
ok(IsDotDir(lpName), "MoveFileA: wildcards file created!");
}
while (FindNextFileA(hFind, &fd));
FindClose(hFind);
}
}
}
#endif
ret = DeleteFileA(source);
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
ret = DeleteFileA(dest);
ok(!ret, "DeleteFileA: error %ld\n", GetLastError());
}
ret = RemoveDirectoryA(tempdir);
ok(ret, "DeleteDirectoryA: error %ld\n", GetLastError());
}
void test_MoveFileW(void)
static void test_MoveFileW(void)
{
WCHAR temp_path[MAX_PATH];
WCHAR source[MAX_PATH], dest[MAX_PATH];
@ -754,7 +756,7 @@ void test_MoveFileW(void)
#define PATTERN_OFFSET 0x10
void test_offset_in_overlapped_structure(void)
static void test_offset_in_overlapped_structure(void)
{
HANDLE hFile;
OVERLAPPED ov;
@ -896,7 +898,7 @@ static void test_LockFile(void)
DeleteFileA( filename );
}
void test_FindFirstFileA()
static void test_FindFirstFileA()
{
HANDLE handle;
WIN32_FIND_DATAA search_results;
@ -912,7 +914,7 @@ void test_FindFirstFileA()
ok ( FindClose(handle) == TRUE, "Failed to close handle");
}
void test_FindNextFileA()
static void test_FindNextFileA()
{
HANDLE handle;
WIN32_FIND_DATAA search_results;
@ -945,6 +947,8 @@ START_TEST(file)
test_CreateFileW();
test_DeleteFileA();
test_DeleteFileW();
test_MoveFileA();
test_MoveFileW();
test_FindFirstFileA();
test_FindNextFileA();
test_LockFile();