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
24064853
Commit
24064853
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: Fix tests of IShellLinkA_SetPath to conform on both Windows 98 and XP.
parent
de774710
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
shelllink.c
dlls/shell32/tests/shelllink.c
+9
-8
No files found.
dlls/shell32/tests/shelllink.c
View file @
24064853
...
@@ -158,9 +158,10 @@ static void test_get_set(void)
...
@@ -158,9 +158,10 @@ static void test_get_set(void)
ok
(
SUCCEEDED
(
r
),
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
SUCCEEDED
(
r
),
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
*
buffer
==
'\0'
,
"GetPath returned '%s'
\n
"
,
buffer
);
ok
(
*
buffer
==
'\0'
,
"GetPath returned '%s'
\n
"
,
buffer
);
/* Win98 returns S_FALSE, but WinXP returns S_OK */
str
=
"c:
\\
nonexistent
\\
file"
;
str
=
"c:
\\
nonexistent
\\
file"
;
r
=
IShellLinkA_SetPath
(
sl
,
str
);
r
=
IShellLinkA_SetPath
(
sl
,
str
);
ok
(
r
==
S_FALSE
,
"SetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
strcpy
(
buffer
,
"garbage"
);
strcpy
(
buffer
,
"garbage"
);
r
=
IShellLinkA_GetPath
(
sl
,
buffer
,
sizeof
(
buffer
),
NULL
,
SLGP_RAWPATH
);
r
=
IShellLinkA_GetPath
(
sl
,
buffer
,
sizeof
(
buffer
),
NULL
,
SLGP_RAWPATH
);
...
@@ -211,28 +212,28 @@ static void test_get_set(void)
...
@@ -211,28 +212,28 @@ static void test_get_set(void)
ok
(
lstrcmpi
(
buffer
,
mypath
)
==
0
,
"GetPath returned '%s'
\n
"
,
buffer
);
ok
(
lstrcmpi
(
buffer
,
mypath
)
==
0
,
"GetPath returned '%s'
\n
"
,
buffer
);
}
}
/* test path with quotes */
/* test path with quotes
(Win98 IShellLinkA_SetPath returns S_FALSE, WinXP returns S_OK)
*/
r
=
IShellLinkA_SetPath
(
sl
,
"
\"
c:
\\
nonexistent
\\
file
\"
"
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"
c:
\\
nonexistent
\\
file
\"
"
);
ok
(
r
==
S_FALSE
,
"SetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
r
=
IShellLinkA_GetPath
(
sl
,
buffer
,
sizeof
(
buffer
),
NULL
,
SLGP_RAWPATH
);
r
=
IShellLinkA_GetPath
(
sl
,
buffer
,
sizeof
(
buffer
),
NULL
,
SLGP_RAWPATH
);
ok
(
r
==
S_OK
,
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_OK
,
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
!
lstrcmp
(
buffer
,
"C:
\\
nonexistent
\\
file"
),
"case doesn't match
\n
"
);
ok
(
!
lstrcmp
(
buffer
,
"C:
\\
nonexistent
\\
file"
),
"case doesn't match
\n
"
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"
c:
\\
foo"
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"
c:
\\
foo"
);
ok
(
r
==
S_FALSE
,
"SetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"\"
c:
\\
foo"
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"\"
c:
\\
foo"
);
ok
(
r
==
S_FALSE
,
"SetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
r
=
IShellLinkA_SetPath
(
sl
,
"c:
\\
foo
\"
"
);
r
=
IShellLinkA_SetPath
(
sl
,
"c:
\\
foo
\"
"
);
ok
(
r
==
S_FALSE
,
"SetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"\"
c:
\\
foo
\"
"
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"\"
c:
\\
foo
\"
"
);
ok
(
r
==
S_FALSE
,
"SetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"\"
c:
\\
foo
\"\"
"
);
r
=
IShellLinkA_SetPath
(
sl
,
"
\"\"
c:
\\
foo
\"\"
"
);
ok
(
r
==
S_FALSE
,
"SetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
/* Test Getting / Setting the arguments */
/* Test Getting / Setting the arguments */
strcpy
(
buffer
,
"garbage"
);
strcpy
(
buffer
,
"garbage"
);
...
...
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