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
0b3b3511
Commit
0b3b3511
authored
Mar 25, 2005
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print retval in decimal to avoid confusion.
NT4 fails with ERROR_INVALID_TARGET_HANDLE instead of ERROR_REDIR_PAUSED. Use some correct messages on error. Extra tracing.
parent
e64b8753
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
shlfileop.c
dlls/shell32/tests/shlfileop.c
+21
-15
No files found.
dlls/shell32/tests/shlfileop.c
View file @
0b3b3511
...
...
@@ -181,19 +181,19 @@ void test_rename()
set_curr_dir_path
(
to
,
"test4.txt
\0
"
);
ok
(
SHFileOperationA
(
&
shfo
),
"File is not renamed moving to other directory "
"when specifying directory name only
\n
"
);
ok
(
file_exists
(
".
\\
test1.txt"
),
"The file is
not
removed
\n
"
);
ok
(
file_exists
(
".
\\
test1.txt"
),
"The file is removed
\n
"
);
set_curr_dir_path
(
from
,
"test3.txt
\0
"
);
set_curr_dir_path
(
to
,
"test4.txt
\\
test1.txt
\0
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"File is renamed moving to other directory
\n
"
);
ok
(
file_exists
(
".
\\
test4.txt
\\
test1.txt"
),
"The file is renamed
\n
"
);
ok
(
file_exists
(
".
\\
test4.txt
\\
test1.txt"
),
"The file is
not
renamed
\n
"
);
set_curr_dir_path
(
from
,
"test1.txt
\0
test2.txt
\0
test4.txt
\0
"
);
set_curr_dir_path
(
to
,
"test6.txt
\0
test7.txt
\0
test8.txt
\0
"
);
retval
=
SHFileOperationA
(
&
shfo
);
/* W98 returns 0, W2K and newer returns ERROR_GEN_FAILURE, both do nothing */
ok
(
!
retval
||
retval
==
ERROR_GEN_FAILURE
||
retval
==
ERROR_
REDIR_PAUSED
,
"Can't rename many files, retval = %l
x
\n
"
,
retval
);
ok
(
file_exists
(
".
\\
test1.txt"
),
"The file is
not
renamed - many files are specified
\n
"
);
ok
(
!
retval
||
retval
==
ERROR_GEN_FAILURE
||
retval
==
ERROR_
INVALID_TARGET_HANDLE
,
"Can't rename many files, retval = %l
d
\n
"
,
retval
);
ok
(
file_exists
(
".
\\
test1.txt"
),
"The file is renamed - many files are specified
\n
"
);
memcpy
(
&
shfo2
,
&
shfo
,
sizeof
(
SHFILEOPSTRUCTA
));
shfo2
.
fFlags
|=
FOF_MULTIDESTFILES
;
...
...
@@ -201,27 +201,33 @@ void test_rename()
set_curr_dir_path
(
from
,
"test1.txt
\0
test2.txt
\0
test4.txt
\0
"
);
set_curr_dir_path
(
to
,
"test6.txt
\0
test7.txt
\0
test8.txt
\0
"
);
retval
=
SHFileOperationA
(
&
shfo2
);
/* W98 returns 0, W2K and newer returns ERROR_GEN_FAILURE, both do nothing */
ok
(
!
retval
||
retval
==
ERROR_GEN_FAILURE
||
retval
==
ERROR_
REDIR_PAUSED
,
"Can't rename many files, retval = %l
x
\n
"
,
retval
);
ok
(
!
retval
||
retval
==
ERROR_GEN_FAILURE
||
retval
==
ERROR_
INVALID_TARGET_HANDLE
,
"Can't rename many files, retval = %l
d
\n
"
,
retval
);
ok
(
file_exists
(
".
\\
test1.txt"
),
"The file is not renamed - many files are specified
\n
"
);
set_curr_dir_path
(
from
,
"test1.txt
\0
"
);
set_curr_dir_path
(
to
,
"test6.txt
\0
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Rename file
\n
"
);
ok
(
!
file_exists
(
".
\\
test1.txt"
),
"The file is renamed
\n
"
);
ok
(
file_exists
(
".
\\
test6.txt"
),
"The file is renamed
\n
"
);
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
!
retval
,
"Rename file failed, retval = %ld
\n
"
,
retval
);
ok
(
!
file_exists
(
".
\\
test1.txt"
),
"The file is not renamed
\n
"
);
ok
(
file_exists
(
".
\\
test6.txt"
),
"The file is not renamed
\n
"
);
set_curr_dir_path
(
from
,
"test6.txt
\0
"
);
set_curr_dir_path
(
to
,
"test1.txt
\0
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Rename file back
\n
"
);
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
!
retval
,
"Rename file back failed, retval = %ld
\n
"
,
retval
);
set_curr_dir_path
(
from
,
"test4.txt
\0
"
);
set_curr_dir_path
(
to
,
"test6.txt
\0
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Rename dir
\n
"
);
ok
(
!
file_exists
(
".
\\
test4.txt"
),
"The dir is renamed
\n
"
);
ok
(
file_exists
(
".
\\
test6.txt"
),
"The dir is renamed
\n
"
);
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
!
retval
,
"Rename dir failed, retval = %ld
\n
"
,
retval
);
ok
(
!
file_exists
(
".
\\
test4.txt"
),
"The dir is not renamed
\n
"
);
ok
(
file_exists
(
".
\\
test6.txt"
),
"The dir is not renamed
\n
"
);
set_curr_dir_path
(
from
,
"test6.txt
\0
"
);
set_curr_dir_path
(
to
,
"test4.txt
\0
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Rename dir back
\n
"
);
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
!
retval
,
"Rename dir back failed, retval = %ld
\n
"
,
retval
);
}
/* tests the FO_COPY action */
...
...
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