Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
edf423ab
Commit
edf423ab
authored
Dec 22, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Dec 22, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add tests for SHFileOperation's FO_RENAME command.
parent
d3c3bc1d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
shlfileop.c
dlls/shell32/tests/shlfileop.c
+34
-0
No files found.
dlls/shell32/tests/shlfileop.c
View file @
edf423ab
...
@@ -323,6 +323,40 @@ static void test_rename(void)
...
@@ -323,6 +323,40 @@ static void test_rename(void)
set_curr_dir_path
(
to
,
"test4.txt
\0
"
);
set_curr_dir_path
(
to
,
"test4.txt
\0
"
);
retval
=
SHFileOperationA
(
&
shfo
);
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
!
retval
,
"Rename dir back failed, retval = %ld
\n
"
,
retval
);
ok
(
!
retval
,
"Rename dir back failed, retval = %ld
\n
"
,
retval
);
/* try to rename more than one file to a single file */
shfo
.
pFrom
=
"test1.txt
\0
test2.txt
\0
"
;
shfo
.
pTo
=
"a.txt
\0
"
;
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
retval
==
ERROR_GEN_FAILURE
,
"Expected ERROR_GEN_FAILURE, got %ld
\n
"
,
retval
);
ok
(
file_exists
(
"test1.txt"
),
"Expected test1.txt to exist
\n
"
);
ok
(
file_exists
(
"test2.txt"
),
"Expected test2.txt to exist
\n
"
);
/* pFrom is valid, but pTo is empty */
shfo
.
pFrom
=
"test1.txt
\0
"
;
shfo
.
pTo
=
"
\0
"
;
retval
=
SHFileOperationA
(
&
shfo
);
todo_wine
{
ok
(
retval
==
ERROR_CANCELLED
,
"Expected ERROR_CANCELLED, got %ld
\n
"
,
retval
);
}
ok
(
file_exists
(
"test1.txt"
),
"Expected test1.txt to exist
\n
"
);
/* pFrom is empty */
shfo
.
pFrom
=
"
\0
"
;
retval
=
SHFileOperationA
(
&
shfo
);
todo_wine
{
ok
(
retval
==
ERROR_ACCESS_DENIED
,
"Expected ERROR_ACCESS_DENIED, got %ld
\n
"
,
retval
);
}
/* pFrom is NULL */
shfo
.
pFrom
=
NULL
;
retval
=
SHFileOperationA
(
&
shfo
);
todo_wine
{
ok
(
retval
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %ld
\n
"
,
retval
);
}
}
}
/* tests the FO_COPY action */
/* 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