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
865029ae
Commit
865029ae
authored
Jul 04, 2021
by
Francois Gouget
Committed by
Alexandre Julliard
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Use WineTest contexts to simplify shellpath.
Signed-off-by:
Francois Gouget
<
fgouget@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6d46299
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
shellpath.c
dlls/shell32/tests/shellpath.c
+12
-7
No files found.
dlls/shell32/tests/shellpath.c
View file @
865029ae
...
...
@@ -2641,8 +2641,9 @@ static void test_DoEnvironmentSubst(void)
"%HOMEDRIVE%%HOMEPATH%"
,
"%OS% %windir%"
};
/* always the last entry in the table */
for
(
i
=
0
;
i
<
(
ARRAY_SIZE
(
names
)
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
names
);
i
++
)
{
winetest_push_context
(
"%d"
,
i
);
memset
(
bufferA
,
'#'
,
MAX_PATH
-
1
);
bufferA
[
MAX_PATH
-
1
]
=
0
;
lstrcpyA
(
bufferA
,
names
[
i
]);
...
...
@@ -2655,19 +2656,21 @@ static void test_DoEnvironmentSubst(void)
if
(
!
i
&&
HIWORD
(
res
)
&&
(
LOWORD
(
res
)
==
(
lstrlenA
(
bufferA
))))
{
win_skip
(
"DoEnvironmentSubstA/W are broken on NT 4
\n
"
);
winetest_pop_context
();
return
;
}
ok
(
HIWORD
(
res
)
&&
(
LOWORD
(
res
)
==
res2
),
"
%d: got %d/%d (expected TRUE/%d)
\n
"
,
i
,
HIWORD
(
res
),
LOWORD
(
res
),
res2
);
"
got %d/%d (expected TRUE/%d)
\n
"
,
HIWORD
(
res
),
LOWORD
(
res
),
res2
);
ok
(
!
lstrcmpA
(
bufferA
,
expectedA
),
"
%d: got %s (expected %s)
\n
"
,
i
,
bufferA
,
expectedA
);
"
got %s (expected %s)
\n
"
,
bufferA
,
expectedA
);
res2
=
ExpandEnvironmentStringsW
(
bufferW
,
expectedW
,
MAX_PATH
);
res
=
DoEnvironmentSubstW
(
bufferW
,
MAX_PATH
);
ok
(
HIWORD
(
res
)
&&
(
LOWORD
(
res
)
==
res2
),
"
%d: got %d/%d (expected TRUE/%d)
\n
"
,
i
,
HIWORD
(
res
),
LOWORD
(
res
),
res2
);
"
got %d/%d (expected TRUE/%d)
\n
"
,
HIWORD
(
res
),
LOWORD
(
res
),
res2
);
ok
(
!
lstrcmpW
(
bufferW
,
expectedW
),
"%d: got %s (expected %s)
\n
"
,
i
,
wine_dbgstr_w
(
bufferW
),
wine_dbgstr_w
(
expectedW
));
"got %s (expected %s)
\n
"
,
wine_dbgstr_w
(
bufferW
),
wine_dbgstr_w
(
expectedW
));
winetest_pop_context
();
}
i
--
;
/* reuse data in the last table entry */
...
...
@@ -3002,15 +3005,17 @@ static void test_PathResolve(void)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests
);
i
++
)
{
winetest_push_context
(
"test %d"
,
i
);
lstrcpyW
(
path
,
tests
[
i
].
path
);
if
(
!
tests
[
i
].
expected
)
SetLastError
(
0xdeadbeef
);
ret
=
pPathResolve
(
path
,
dirs
,
tests
[
i
].
flags
);
ok
(
ret
==
tests
[
i
].
expected
,
"
test %d: expected %d, got %d
\n
"
,
i
,
tests
[
i
].
expected
,
ret
);
ok
(
ret
==
tests
[
i
].
expected
,
"
expected %d, got %d
\n
"
,
tests
[
i
].
expected
,
ret
);
ok
(
!
lstrcmpiW
(
path
,
tests
[
i
].
expected_path
),
"
test %d: expected %s, got %s
\n
"
,
i
,
wine_dbgstr_w
(
tests
[
i
].
expected_path
),
wine_dbgstr_w
(
path
));
"
expected %s, got %s
\n
"
,
wine_dbgstr_w
(
tests
[
i
].
expected_path
),
wine_dbgstr_w
(
path
));
if
(
!
tests
[
i
].
expected
)
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
GetLastError
());
winetest_pop_context
();
}
CloseHandle
(
file
);
...
...
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