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
b564a913
Commit
b564a913
authored
Mar 02, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Rewording and cleanup.
parent
d478f5da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
shlfileop.c
dlls/shell32/tests/shlfileop.c
+20
-20
No files found.
dlls/shell32/tests/shlfileop.c
View file @
b564a913
...
...
@@ -248,18 +248,18 @@ static void test_delete(void)
shfo
.
hNameMappings
=
NULL
;
shfo
.
lpszProgressTitle
=
NULL
;
ok
(
!
SHFileOperationA
(
&
shfo
),
"Deletion was successful
\n
"
);
ok
(
file_exists
(
"test4.txt"
),
"Directory should not
be
removed
\n
"
);
ok
(
!
file_exists
(
"test1.txt"
),
"File should
be
removed
\n
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Deletion was
not
successful
\n
"
);
ok
(
file_exists
(
"test4.txt"
),
"Directory should not
have been
removed
\n
"
);
ok
(
!
file_exists
(
"test1.txt"
),
"File should
have been
removed
\n
"
);
ret
=
SHFileOperationA
(
&
shfo
);
ok
(
!
ret
,
"Directory exists, but is not removed, ret=%d
\n
"
,
ret
);
ok
(
file_exists
(
"test4.txt"
),
"Directory should not
be
removed
\n
"
);
ok
(
file_exists
(
"test4.txt"
),
"Directory should not
have been
removed
\n
"
);
shfo
.
fFlags
=
FOF_NOCONFIRMATION
|
FOF_SILENT
|
FOF_NOERRORUI
;
ok
(
!
SHFileOperationA
(
&
shfo
),
"Directory removed
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"Directory should
be
removed
\n
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Directory
is not
removed
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"Directory should
have been
removed
\n
"
);
ret
=
SHFileOperationA
(
&
shfo
);
ok
(
!
ret
,
"The requested file does not exist, ret=%d
\n
"
,
ret
);
...
...
@@ -267,33 +267,33 @@ static void test_delete(void)
init_shfo_tests
();
sprintf
(
buf
,
"%s
\\
%s"
,
CURR_DIR
,
"test4.txt"
);
buf
[
strlen
(
buf
)
+
1
]
=
'\0'
;
ok
(
MoveFileA
(
"test1.txt"
,
"test4.txt
\\
test1.txt"
),
"Fill
the subdirectory
\n
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Directory removed
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"Directory is removed
\n
"
);
ok
(
MoveFileA
(
"test1.txt"
,
"test4.txt
\\
test1.txt"
),
"Fill
ing the subdirectory failed
\n
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Directory
is not
removed
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"Directory is
not
removed
\n
"
);
init_shfo_tests
();
shfo
.
pFrom
=
"test1.txt
\0
test4.txt
\0
"
;
ok
(
!
SHFileOperationA
(
&
shfo
),
"Directory and a file
removed
\n
"
);
ok
(
!
file_exists
(
"test1.txt"
),
"The file should be
removed
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"Directory should be
removed
\n
"
);
ok
(
file_exists
(
"test2.txt"
),
"This file should not
be
removed
\n
"
);
ok
(
!
SHFileOperationA
(
&
shfo
),
"Directory and a file are not
removed
\n
"
);
ok
(
!
file_exists
(
"test1.txt"
),
"The file should have been
removed
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"Directory should have been
removed
\n
"
);
ok
(
file_exists
(
"test2.txt"
),
"This file should not
have been
removed
\n
"
);
/* FOF_FILESONLY does not delete a dir matching a wildcard */
init_shfo_tests
();
shfo
.
fFlags
|=
FOF_FILESONLY
;
shfo
.
pFrom
=
"*.txt
\0
"
;
ok
(
!
SHFileOperation
(
&
shfo
),
"Failed to delete files
\n
"
);
ok
(
!
file_exists
(
"test1.txt"
),
"test1.txt should be
removed
\n
"
);
ok
(
!
file_exists
(
"test_5.txt"
),
"test_5.txt should be
removed
\n
"
);
ok
(
file_exists
(
"test4.txt"
),
"test4.txt should not
be
removed
\n
"
);
ok
(
!
file_exists
(
"test1.txt"
),
"test1.txt should have been
removed
\n
"
);
ok
(
!
file_exists
(
"test_5.txt"
),
"test_5.txt should have been
removed
\n
"
);
ok
(
file_exists
(
"test4.txt"
),
"test4.txt should not
have been
removed
\n
"
);
/* FOF_FILESONLY only deletes a dir if explicitly specified */
init_shfo_tests
();
shfo
.
pFrom
=
"test_?.txt
\0
test4.txt
\0
"
;
ok
(
!
SHFileOperation
(
&
shfo
),
"Failed to delete files
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"test4.txt should be
removed
\n
"
);
ok
(
!
file_exists
(
"test_5.txt"
),
"test_5.txt should be
removed
\n
"
);
ok
(
file_exists
(
"test1.txt"
),
"test1.txt should not
be
removed
\n
"
);
ok
(
!
SHFileOperation
(
&
shfo
),
"Failed to delete files and directory
\n
"
);
ok
(
!
file_exists
(
"test4.txt"
),
"test4.txt should have been
removed
\n
"
);
ok
(
!
file_exists
(
"test_5.txt"
),
"test_5.txt should have been
removed
\n
"
);
ok
(
file_exists
(
"test1.txt"
),
"test1.txt should not
have been
removed
\n
"
);
/* try to delete an invalid filename */
init_shfo_tests
();
...
...
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