Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
11586214
Commit
11586214
authored
Apr 27, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed todo_wine from some tests that succeed now.
parent
ad9b7993
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
102 deletions
+66
-102
directory.c
dlls/kernel/tests/directory.c
+47
-56
file.c
dlls/kernel/tests/file.c
+9
-14
path.c
dlls/kernel/tests/path.c
+10
-32
No files found.
dlls/kernel/tests/directory.c
View file @
11586214
...
...
@@ -193,21 +193,19 @@ 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
,
"CreateDirectoryA with ? wildcard name should fail, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryA
(
tmpdir
);
tmpdir
[
lstrlenA
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
CreateDirectoryA
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"CreateDirectoryA with * wildcard name should fail, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryA
(
tmpdir
);
}
lstrcatA
(
tmpdir
,
"?"
);
ret
=
CreateDirectoryA
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"CreateDirectoryA with ? wildcard name should fail, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryA
(
tmpdir
);
tmpdir
[
lstrlenA
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
CreateDirectoryA
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"CreateDirectoryA with * wildcard name should fail, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryA
(
tmpdir
);
}
static
void
test_CreateDirectoryW
(
void
)
...
...
@@ -256,21 +254,19 @@ 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
,
"CreateDirectoryW with ? wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryW
(
tmpdir
);
tmpdir
[
lstrlenW
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
CreateDirectoryW
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"CreateDirectoryW with * wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryW
(
tmpdir
);
}
lstrcatW
(
tmpdir
,
questionW
);
ret
=
CreateDirectoryW
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"CreateDirectoryW with ? wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryW
(
tmpdir
);
tmpdir
[
lstrlenW
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
CreateDirectoryW
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"CreateDirectoryW with * wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
ret
=
RemoveDirectoryW
(
tmpdir
);
}
static
void
test_RemoveDirectoryA
(
void
)
...
...
@@ -286,19 +282,17 @@ 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
,
"RemoveDirectoryA with ? wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
tmpdir
[
lstrlenA
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
RemoveDirectoryA
(
tmpdir
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"RemoveDirectoryA with * wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
}
lstrcatA
(
tmpdir
,
"?"
);
ret
=
RemoveDirectoryA
(
tmpdir
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"RemoveDirectoryA with ? wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
tmpdir
[
lstrlenA
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
RemoveDirectoryA
(
tmpdir
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"RemoveDirectoryA with * wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
}
static
void
test_RemoveDirectoryW
(
void
)
...
...
@@ -319,20 +313,17 @@ 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
,
"RemoveDirectoryW with wildcard should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
tmpdir
[
lstrlenW
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
RemoveDirectoryW
(
tmpdir
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"RemoveDirectoryW with * wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
}
lstrcatW
(
tmpdir
,
questionW
);
ret
=
RemoveDirectoryW
(
tmpdir
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"RemoveDirectoryW with wildcard should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
tmpdir
[
lstrlenW
(
tmpdir
)
-
1
]
=
'*'
;
ret
=
RemoveDirectoryW
(
tmpdir
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"RemoveDirectoryW with * wildcard name should fail with error 183, ret=%s error=%ld
\n
"
,
ret
?
" True"
:
"False"
,
GetLastError
());
}
START_TEST
(
directory
)
...
...
dlls/kernel/tests/file.c
View file @
11586214
...
...
@@ -738,14 +738,12 @@ 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());
if (ret || (GetLastError() != ERROR_INVALID_NAME))
{
ok
(
!
ret
,
"MoveFileA: shouldn't move to wildcard file
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_NAME
,
"MoveFileA: with wildcards, unexpected error %ld
\n
"
,
GetLastError
());
if
(
ret
||
(
GetLastError
()
!=
ERROR_INVALID_NAME
))
{
WIN32_FIND_DATAA
fd
;
char
temppath
[
MAX_PATH
];
HANDLE
hFind
;
...
...
@@ -766,14 +764,11 @@ static void test_MoveFileA(void)
while
(
FindNextFileA
(
hFind
,
&
fd
));
FindClose
(
hFind
);
}
}
ret = DeleteFileA(source);
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
ret = DeleteFileA(dest);
ok(!ret, "DeleteFileA: error %ld\n", GetLastError());
}
#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
());
}
...
...
dlls/kernel/tests/path.c
View file @
11586214
...
...
@@ -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,44 +227,24 @@ 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
"
);
...
...
@@ -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
,
t
odo
,
t
mpstr1
);
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
,
t
odo
,
t
mpstr1
);
test_FunnyChars
(
curdir
,
tmpstr
,
valid
,
tmpstr1
);
sprintf
(
tmpstr1
,
"check%d-3"
,
i
);
sprintf
(
tmpstr
,
"%cfile000.ext"
,
funny_chars
[
i
]);
test_FunnyChars
(
curdir
,
tmpstr
,
valid
,
t
odo
,
t
mpstr1
);
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
,
t
odo
,
t
mpstr1
);
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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment