Removed todo_wine from some tests that succeed now.

This commit is contained in:
Alexandre Julliard 2004-04-27 02:27:47 +00:00
parent ad9b799324
commit 115862146a
3 changed files with 63 additions and 99 deletions

View File

@ -193,7 +193,6 @@ static void test_CreateDirectoryA(void)
ret = RemoveDirectoryA(tmpdir);
ok(ret == TRUE, "RemoveDirectoryA should always succeed\n");
todo_wine {
lstrcatA(tmpdir, "?");
ret = CreateDirectoryA(tmpdir, NULL);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME,
@ -208,7 +207,6 @@ static void test_CreateDirectoryA(void)
ret ? " True" : "False", GetLastError());
ret = RemoveDirectoryA(tmpdir);
}
}
static void test_CreateDirectoryW(void)
{
@ -256,7 +254,6 @@ static void test_CreateDirectoryW(void)
ret = RemoveDirectoryW(tmpdir);
ok(ret == TRUE, "RemoveDirectoryW should always succeed\n");
todo_wine {
lstrcatW(tmpdir, questionW);
ret = CreateDirectoryW(tmpdir, NULL);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME,
@ -271,7 +268,6 @@ static void test_CreateDirectoryW(void)
ret ? " True" : "False", GetLastError());
ret = RemoveDirectoryW(tmpdir);
}
}
static void test_RemoveDirectoryA(void)
{
@ -286,7 +282,6 @@ static void test_RemoveDirectoryA(void)
ret = RemoveDirectoryA(tmpdir);
ok(ret == TRUE, "RemoveDirectoryA should always succeed\n");
todo_wine {
lstrcatA(tmpdir, "?");
ret = RemoveDirectoryA(tmpdir);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME,
@ -299,7 +294,6 @@ static void test_RemoveDirectoryA(void)
"RemoveDirectoryA with * wildcard name should fail with error 183, ret=%s error=%ld\n",
ret ? " True" : "False", GetLastError());
}
}
static void test_RemoveDirectoryW(void)
{
@ -319,7 +313,6 @@ static void test_RemoveDirectoryW(void)
ret = RemoveDirectoryW(tmpdir);
ok(ret == TRUE, "RemoveDirectoryW should always succeed\n");
todo_wine {
lstrcatW(tmpdir, questionW);
ret = RemoveDirectoryW(tmpdir);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME,
@ -333,8 +326,6 @@ static void test_RemoveDirectoryW(void)
ret ? " True" : "False", GetLastError());
}
}
START_TEST(directory)
{
test_GetWindowsDirectoryA();

View File

@ -738,9 +738,7 @@ static void test_MoveFileA(void)
lstrcpyA(dest, tempdir);
lstrcatA(dest, "\\wild?.*");
/* FIXME: if we create a file with wildcards we can't delete it now that DeleteFile works correctly */
#if 0
ret = MoveFileA(source, dest);
todo_wine {
ok(!ret, "MoveFileA: shouldn't move to wildcard file\n");
ok(GetLastError() == ERROR_INVALID_NAME,
"MoveFileA: with wildcards, unexpected error %ld\n", GetLastError());
@ -771,9 +769,6 @@ static void test_MoveFileA(void)
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
ret = DeleteFileA(dest);
ok(!ret, "DeleteFileA: error %ld\n", GetLastError());
}
#endif
ret = RemoveDirectoryA(tempdir);
ok(ret, "DeleteDirectoryA: error %ld\n", GetLastError());
}

View File

@ -48,7 +48,6 @@
*/
static const CHAR funny_chars[]="!@#$%^&*()=+{}[],?'`";
static const CHAR is_char_ok[] ="11111110111111111011";
static const CHAR wine_todo[] ="00000000000000000000";
static DWORD (WINAPI *pGetLongPathNameA)(LPCSTR,LPSTR,DWORD);
@ -228,45 +227,25 @@ static void test_LongtoShortA(CHAR *teststr,CHAR *goodstr,
Get(Short|Long)PathNameA should never pass, but GetFullPathNameA
should.
*/
static void test_FunnyChars(CHAR *curdir,CHAR *filename,
INT valid,INT todo,CHAR *errstr) {
static void test_FunnyChars(CHAR *curdir,CHAR *filename, INT valid,CHAR *errstr)
{
CHAR tmpstr[MAX_PATH],tmpstr1[MAX_PATH];
SLpassfail passfail;
test_ValidPathA(curdir,"",filename,tmpstr,&passfail,errstr);
if(valid) {
sprintf(tmpstr1,"%s\\%s",curdir,filename);
if(todo) {
todo_wine {
ok((passfail.shortlen==0 &&
(passfail.shorterror==ERROR_FILE_NOT_FOUND || passfail.shorterror==ERROR_PATH_NOT_FOUND || !passfail.shorterror)) ||
(passfail.shortlen==strlen(tmpstr1) && lstrcmpiA(tmpstr,tmpstr1)==0),
"%s: GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n",
errstr,passfail.shortlen,passfail.shorterror,tmpstr);
}
} else {
ok((passfail.shortlen==0 &&
(passfail.shorterror==ERROR_FILE_NOT_FOUND || passfail.shorterror==ERROR_PATH_NOT_FOUND || !passfail.shorterror)) ||
(passfail.shortlen==strlen(tmpstr1) && lstrcmpiA(tmpstr,tmpstr1)==0),
"%s: GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n",
errstr,passfail.shortlen,passfail.shorterror,tmpstr);
}
} else {
if(todo) {
todo_wine {
/* Win2k returns ERROR_INVALID_NAME, Win98, wine return ERROR_FILE_NOT_FOUND, NT4 doesn't set last error */
ok(passfail.shortlen==0 &&
(passfail.shorterror==ERROR_INVALID_NAME || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror),
"%s: GetShortPathA should have failed len=%ld, error=%ld\n",
errstr,passfail.shortlen,passfail.shorterror);
}
} else {
ok(passfail.shortlen==0 &&
(passfail.shorterror==ERROR_INVALID_NAME || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror),
"%s: GetShortPathA should have failed len=%ld, error=%ld\n",
errstr,passfail.shortlen,passfail.shorterror);
}
}
if(pGetLongPathNameA) {
ok(passfail.longlen==0,"GetLongPathNameA passed when it shouldn't have\n");
if(valid) {
@ -782,30 +761,29 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive)
}
/* Check out Get*PathNameA on some funny characters */
for(i=0;i<lstrlenA(funny_chars);i++) {
INT valid,todo;
INT valid;
valid=(is_char_ok[i]=='0') ? 0 : 1;
todo=(wine_todo[i]=='0') ? 0 : 1;
sprintf(tmpstr1,"check%d-1",i);
sprintf(tmpstr,"file%c000.ext",funny_chars[i]);
test_FunnyChars(curdir,tmpstr,valid,todo,tmpstr1);
test_FunnyChars(curdir,tmpstr,valid,tmpstr1);
sprintf(tmpstr1,"check%d-2",i);
sprintf(tmpstr,"file000.e%ct",funny_chars[i]);
test_FunnyChars(curdir,tmpstr,valid,todo,tmpstr1);
test_FunnyChars(curdir,tmpstr,valid,tmpstr1);
sprintf(tmpstr1,"check%d-3",i);
sprintf(tmpstr,"%cfile000.ext",funny_chars[i]);
test_FunnyChars(curdir,tmpstr,valid,todo,tmpstr1);
test_FunnyChars(curdir,tmpstr,valid,tmpstr1);
sprintf(tmpstr1,"check%d-4",i);
sprintf(tmpstr,"file000%c.ext",funny_chars[i]);
test_FunnyChars(curdir,tmpstr,valid,todo,tmpstr1);
test_FunnyChars(curdir,tmpstr,valid,tmpstr1);
sprintf(tmpstr1,"check%d-5",i);
sprintf(tmpstr,"Long %c File",funny_chars[i]);
test_FunnyChars(curdir,tmpstr,valid,0,tmpstr1);
test_FunnyChars(curdir,tmpstr,valid,tmpstr1);
sprintf(tmpstr1,"check%d-6",i);
sprintf(tmpstr,"%c Long File",funny_chars[i]);
test_FunnyChars(curdir,tmpstr,valid,0,tmpstr1);
test_FunnyChars(curdir,tmpstr,valid,tmpstr1);
sprintf(tmpstr1,"check%d-7",i);
sprintf(tmpstr,"Long File %c",funny_chars[i]);
test_FunnyChars(curdir,tmpstr,valid,0,tmpstr1);
test_FunnyChars(curdir,tmpstr,valid,tmpstr1);
}
}