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
05ff15a7
Commit
05ff15a7
authored
Jan 24, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jan 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Test links to executable filenames lacking the extension.
parent
365ae23e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
shelllink.c
dlls/shell32/tests/shelllink.c
+63
-0
No files found.
dlls/shell32/tests/shelllink.c
View file @
05ff15a7
...
...
@@ -681,6 +681,24 @@ static void test_load_save(void)
create_lnk
(
lnkfile
,
&
desc
,
0
);
check_lnk
(
lnkfile
,
&
desc
,
0x0
);
/* Test omitting .exe from an absolute path */
p
=
strrchr
(
mypath
,
'.'
);
if
(
p
)
*
p
=
'\0'
;
desc
.
description
=
"absolute path without .exe"
;
desc
.
workdir
=
mydir
;
desc
.
path
=
mypath
;
desc
.
pidl
=
NULL
;
desc
.
arguments
=
"/option1 /option2
\"
Some string
\"
"
;
desc
.
showcmd
=
SW_SHOWNORMAL
;
desc
.
icon
=
mypath
;
desc
.
icon_id
=
0
;
desc
.
hotkey
=
0x1234
;
create_lnk
(
lnkfile
,
&
desc
,
0
);
desc
.
path
=
realpath
;
check_lnk
(
lnkfile
,
&
desc
,
0x4
);
/* Overwrite the existing lnk file and test link to a command on the path */
desc
.
description
=
"command on path"
;
desc
.
workdir
=
mypath
;
...
...
@@ -697,6 +715,22 @@ static void test_load_save(void)
desc
.
path
=
realpath
;
check_lnk
(
lnkfile
,
&
desc
,
0x0
);
/* Test omitting .exe from a command on the path */
desc
.
description
=
"command on path without .exe"
;
desc
.
workdir
=
mypath
;
desc
.
path
=
"rundll32"
;
desc
.
pidl
=
NULL
;
desc
.
arguments
=
"/option1 /option2
\"
Some string
\"
"
;
desc
.
showcmd
=
SW_SHOWNORMAL
;
desc
.
icon
=
mypath
;
desc
.
icon_id
=
0
;
desc
.
hotkey
=
0x1234
;
create_lnk
(
lnkfile
,
&
desc
,
0
);
/* Check that link is created to proper location */
SearchPathA
(
NULL
,
"rundll32"
,
NULL
,
MAX_PATH
,
realpath
,
NULL
);
desc
.
path
=
realpath
;
check_lnk
(
lnkfile
,
&
desc
,
0x4
);
/* Create a temporary non-executable file */
r
=
GetTempPath
(
sizeof
(
mypath
),
mypath
);
ok
(
r
<
sizeof
(
mypath
),
"GetTempPath failed (%d), err %d
\n
"
,
r
,
GetLastError
());
...
...
@@ -747,6 +781,35 @@ static void test_load_save(void)
r
=
DeleteFileA
(
mypath
);
ok
(
r
,
"failed to delete file %s (%d)
\n
"
,
mypath
,
GetLastError
());
/* Create a temporary .bat file */
strcpy
(
mypath
,
mydir
);
strcat
(
mypath
,
"
\\
test.bat"
);
hf
=
CreateFile
(
mypath
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
CloseHandle
(
hf
);
strcpy
(
realpath
,
mypath
);
p
=
strrchr
(
mypath
,
'.'
);
if
(
p
)
*
p
=
'\0'
;
/* Try linking to the .bat file without the extension */
desc
.
description
=
"batch 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
);
desc
.
path
=
realpath
;
check_lnk
(
lnkfile
,
&
desc
,
0x4
);
r
=
DeleteFileA
(
realpath
);
/* FIXME: Also test saving a .lnk pointing to a pidl that cannot be
* 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