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
43149f49
Commit
43149f49
authored
Oct 22, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for creating empty shelllink files.
parent
6898ccbe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
0 deletions
+81
-0
.cvsignore
dlls/shell32/tests/.cvsignore
+1
-0
Makefile.in
dlls/shell32/tests/Makefile.in
+1
-0
shelllink.c
dlls/shell32/tests/shelllink.c
+79
-0
No files found.
dlls/shell32/tests/.cvsignore
View file @
43149f49
Makefile
generated.ok
shelllink.ok
shellpath.ok
shlfileop.ok
shlfolder.ok
...
...
dlls/shell32/tests/Makefile.in
View file @
43149f49
...
...
@@ -8,6 +8,7 @@ EXTRALIBS = -luuid
CTESTS
=
\
generated.c
\
shelllink.c
\
shellpath.c
\
shlfileop.c
\
shlfolder.c
\
...
...
dlls/shell32/tests/shelllink.c
0 → 100644
View file @
43149f49
/*
* Unit tests for shelllinks
*
* Copyright 2004 Mike McCormack
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* This is a test program for the SHGet{Special}Folder{Path|Location} functions
* of shell32, that get either a filesytem path or a LPITEMIDLIST (shell
* namespace) path for a given folder (CSIDL value).
*
*/
#define COBJMACROS
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "shlguid.h"
#include "shobjidl.h"
#include "wine/test.h"
static
void
test_empty_shelllink
()
{
HRESULT
r
;
IShellLinkW
*
sl
;
WCHAR
buffer
[
0x100
];
IPersistFile
*
pf
;
CoInitialize
(
NULL
);
/* empty shelllink ? */
r
=
CoCreateInstance
(
&
CLSID_ShellLink
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IShellLinkW
,
(
LPVOID
*
)
&
sl
);
ok
(
r
==
S_OK
,
"no shelllink
\n
"
);
if
(
r
==
S_OK
)
{
static
const
WCHAR
lnk
[]
=
{
'C'
,
':'
,
'\\'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
'l'
,
'n'
,
'k'
,
0
};
buffer
[
0
]
=
'x'
;
buffer
[
1
]
=
0
;
r
=
IShellLinkW_GetPath
(
sl
,
buffer
,
0x100
,
NULL
,
SLGP_RAWPATH
);
ok
(
r
==
S_OK
,
"GetPath failed
\n
"
);
ok
(
buffer
[
0
]
==
0
,
"path wrong
\n
"
);
r
=
IShellLinkW_QueryInterface
(
sl
,
&
IID_IPersistFile
,
(
LPVOID
*
)
&
pf
);
ok
(
r
==
S_OK
,
"no IPersistFile
\n
"
);
todo_wine
{
if
(
r
==
S_OK
)
{
r
=
IPersistFile_Save
(
pf
,
lnk
,
TRUE
);
ok
(
r
==
S_OK
,
"save failed
\n
"
);
IPersistFile_Release
(
pf
);
}
IShellLinkW_Release
(
sl
);
ok
(
DeleteFileW
(
lnk
),
"failed to delete link
\n
"
);
}
}
}
START_TEST
(
shelllink
)
{
test_empty_shelllink
();
}
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