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
814ab9ee
Commit
814ab9ee
authored
Jan 30, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Create trash test file in temp directory.
parent
a872c21a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
recyclebin.c
dlls/shell32/tests/recyclebin.c
+6
-8
No files found.
dlls/shell32/tests/recyclebin.c
View file @
814ab9ee
...
...
@@ -55,8 +55,7 @@ static void test_query_recyclebin(void)
HRESULT
hr
;
HANDLE
file
;
SHFILEOPSTRUCTA
shfo
;
const
CHAR
name
[]
=
"test.txt"
;
CHAR
buf
[
MAX_PATH
+
sizeof
(
name
)
+
1
];
CHAR
temp_path
[
MAX_PATH
-
14
],
buf
[
MAX_PATH
+
1
];
if
(
!
pSHQueryRecycleBinA
)
{
skip
(
"SHQueryRecycleBinA does not exist
\n
"
);
...
...
@@ -67,18 +66,17 @@ static void test_query_recyclebin(void)
skip
(
"SHFileOperationA does not exist
\n
"
);
return
;
}
GetCurrentDirectoryA
(
MAX_PATH
,
buf
);
strcat
(
buf
,
"
\\
"
);
strcat
(
buf
,
name
);
ok
(
GetTempPathA
(
sizeof
(
temp_path
),
temp_path
),
"GetTempPath failed
\n
"
);
ok
(
GetTempFileNameA
(
temp_path
,
"trash"
,
0
,
buf
),
"GetTempFileName failed
\n
"
);
buf
[
strlen
(
buf
)
+
1
]
=
'\0'
;
hr
=
pSHQueryRecycleBinA
(
buf
,
&
info1
);
ok
(
hr
==
S_OK
,
"SHQueryRecycleBinA failed with error 0x%x
\n
"
,
hr
);
ok
(
info1
.
i64Size
!=
0xdeadbeef
,
"i64Size not set
\n
"
);
ok
(
info1
.
i64NumItems
!=
0xdeadbeef
,
"i64NumItems not set
\n
"
);
/*create and send a file to the recycle bin*/
file
=
CreateFileA
(
name
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"Failure to open file %s
\n
"
,
name
);
WriteFile
(
file
,
name
,
strlen
(
name
),
&
written
,
NULL
);
file
=
CreateFileA
(
buf
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"Failure to open file %s
\n
"
,
buf
);
WriteFile
(
file
,
buf
,
strlen
(
buf
),
&
written
,
NULL
);
CloseHandle
(
file
);
shfo
.
hwnd
=
NULL
;
shfo
.
wFunc
=
FO_DELETE
;
...
...
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