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
75fbca22
Commit
75fbca22
authored
Jun 28, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
Jun 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Add test for shell links to existing non-executable files.
parent
f8eabe0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
shelllink.c
dlls/shell32/tests/shelllink.c
+32
-0
No files found.
dlls/shell32/tests/shelllink.c
View file @
75fbca22
...
@@ -495,6 +495,7 @@ static void test_load_save(void)
...
@@ -495,6 +495,7 @@ static void test_load_save(void)
char
mydir
[
MAX_PATH
];
char
mydir
[
MAX_PATH
];
char
realpath
[
MAX_PATH
];
char
realpath
[
MAX_PATH
];
char
*
p
;
char
*
p
;
HANDLE
hf
;
DWORD
r
;
DWORD
r
;
/* Save an empty .lnk file */
/* Save an empty .lnk file */
...
@@ -558,6 +559,37 @@ static void test_load_save(void)
...
@@ -558,6 +559,37 @@ static void test_load_save(void)
desc
.
path
=
realpath
;
desc
.
path
=
realpath
;
check_lnk
(
lnkfile
,
&
desc
,
0x0
);
check_lnk
(
lnkfile
,
&
desc
,
0x0
);
/* Create a temporary non-executable file */
r
=
GetTempPath
(
sizeof
(
mypath
),
mypath
);
ok
(
r
>=
0
&&
r
<
sizeof
(
mypath
),
"GetTempPath failed (%d), err %d
\n
"
,
r
,
GetLastError
());
r
=
GetLongPathName
(
mypath
,
mydir
,
sizeof
(
mydir
));
ok
(
r
>=
0
&&
r
<
sizeof
(
mydir
),
"GetLongPathName failed (%d), err %d
\n
"
,
r
,
GetLastError
());
p
=
strrchr
(
mydir
,
'\\'
);
if
(
p
)
*
p
=
'\0'
;
strcpy
(
mypath
,
mydir
);
strcat
(
mypath
,
"
\\
test.txt"
);
hf
=
CreateFile
(
mypath
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
CloseHandle
(
hf
);
/* Overwrite the existing lnk file and test link to an existing non-executable file */
desc
.
description
=
"non-executable file"
;
desc
.
workdir
=
mydir
;
desc
.
path
=
mypath
;
desc
.
pidl
=
NULL
;
desc
.
arguments
=
""
;
desc
.
showcmd
=
SW_SHOWNORMAL
;
desc
.
icon
=
mypath
;
desc
.
icon_id
=
0
;
desc
.
hotkey
=
0x1234
;
create_lnk
(
lnkfile
,
&
desc
,
0
);
check_lnk
(
lnkfile
,
&
desc
,
0x4
);
r
=
DeleteFileA
(
mypath
);
ok
(
r
,
"failed to delete file %s (%d)
\n
"
,
mypath
,
GetLastError
());
/* FIXME: Also test saving a .lnk pointing to a pidl that cannot be
/* FIXME: Also test saving a .lnk pointing to a pidl that cannot be
* represented as a path.
* represented as a path.
*/
*/
...
...
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