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
8a5e6030
Commit
8a5e6030
authored
Sep 14, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Avoid assumptions about the current working directory.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ad22785c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
19 deletions
+14
-19
actctx.c
dlls/kernel32/tests/actctx.c
+6
-15
path.c
dlls/kernel32/tests/path.c
+2
-1
process.c
dlls/kernel32/tests/process.c
+6
-3
No files found.
dlls/kernel32/tests/actctx.c
View file @
8a5e6030
...
...
@@ -36,16 +36,6 @@ static NTSTATUS(NTAPI *pRtlFindActivationContextSectionString)(DWORD,const GUID
static
BOOLEAN
(
NTAPI
*
pRtlCreateUnicodeStringFromAsciiz
)(
PUNICODE_STRING
,
PCSZ
);
static
VOID
(
NTAPI
*
pRtlFreeUnicodeString
)(
PUNICODE_STRING
);
static
const
char
*
strw
(
LPCWSTR
x
)
{
static
char
buffer
[
1024
];
char
*
p
=
buffer
;
if
(
!
x
)
return
"(nil)"
;
else
while
((
*
p
++
=
*
x
++
));
return
buffer
;
}
#ifdef __i386__
#define ARCH "x86"
#elif defined __x86_64__
...
...
@@ -622,7 +612,7 @@ static const detailed_info_t detailed_info0 = {
static
const
detailed_info_t
detailed_info1
=
{
1
,
1
,
1
,
ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE
,
manifest_path
,
ACTIVATION_CONTEXT_PATH_TYPE_NONE
,
ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE
,
work
_dir
,
app
_dir
,
};
static
const
detailed_info_t
detailed_info1_child
=
{
...
...
@@ -635,7 +625,7 @@ static const detailed_info_t detailed_info1_child = {
static
const
detailed_info_t
detailed_info2
=
{
1
,
2
,
3
,
ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE
,
manifest_path
,
ACTIVATION_CONTEXT_PATH_TYPE_NONE
,
ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE
,
work
_dir
,
app
_dir
,
};
static
void
test_detailed_info
(
HANDLE
handle
,
const
detailed_info_t
*
exinfo
,
int
line
)
...
...
@@ -706,7 +696,8 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo, int
ok_
(
__FILE__
,
line
)(
detailed_info
->
lpAppDirPath
!=
NULL
,
"detailed_info->lpAppDirPath == NULL
\n
"
);
if
(
detailed_info
->
lpAppDirPath
)
ok_
(
__FILE__
,
line
)(
!
lstrcmpiW
(
exinfo
->
app_dir
,
detailed_info
->
lpAppDirPath
),
"unexpected detailed_info->lpAppDirPath
\n
%s
\n
"
,
strw
(
detailed_info
->
lpAppDirPath
));
"unexpected detailed_info->lpAppDirPath %s / %s
\n
"
,
wine_dbgstr_w
(
detailed_info
->
lpAppDirPath
),
wine_dbgstr_w
(
exinfo
->
app_dir
));
}
else
{
ok_
(
__FILE__
,
line
)(
detailed_info
->
lpAppDirPath
==
NULL
,
"detailed_info->lpAppDirPath != NULL
\n
"
);
}
...
...
@@ -864,7 +855,7 @@ static void test_info_in_assembly(HANDLE handle, DWORD id, const info_in_assembl
if
(
info
->
lpAssemblyEncodedAssemblyIdentity
&&
exinfo
->
encoded_assembly_id
)
{
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
info
->
lpAssemblyEncodedAssemblyIdentity
,
exinfo
->
encoded_assembly_id
),
"unexpected info->lpAssemblyEncodedAssemblyIdentity %s / %s
\n
"
,
str
w
(
info
->
lpAssemblyEncodedAssemblyIdentity
),
wine_dbgstr_w
(
exinfo
->
encoded_assembly_id
));
wine_dbgstr_
w
(
info
->
lpAssemblyEncodedAssemblyIdentity
),
wine_dbgstr_w
(
exinfo
->
encoded_assembly_id
));
}
if
(
exinfo
->
manifest_path
)
{
ok_
(
__FILE__
,
line
)(
info
->
lpAssemblyManifestPath
!=
NULL
,
"info->lpAssemblyManifestPath == NULL
\n
"
);
...
...
@@ -882,7 +873,7 @@ static void test_info_in_assembly(HANDLE handle, DWORD id, const info_in_assembl
ok_
(
__FILE__
,
line
)(
info
->
lpAssemblyDirectoryName
!=
NULL
,
"info->lpAssemblyDirectoryName == NULL
\n
"
);
else
ok_
(
__FILE__
,
line
)(
info
->
lpAssemblyDirectoryName
==
NULL
,
"info->lpAssemblyDirectoryName = %s
\n
"
,
str
w
(
info
->
lpAssemblyDirectoryName
));
wine_dbgstr_
w
(
info
->
lpAssemblyDirectoryName
));
HeapFree
(
GetProcessHeap
(),
0
,
info
);
}
...
...
dlls/kernel32/tests/path.c
View file @
8a5e6030
...
...
@@ -1877,7 +1877,8 @@ static void test_SearchPathA(void)
ok
(
ret
&&
ret
==
strlen
(
path2A
),
"got %d
\n
"
,
ret
);
bret
=
CopyFileA
(
path2A
,
pathA
,
FALSE
);
ok
(
bret
!=
0
,
"failed to copy test executable to temp directory, %u
\n
"
,
GetLastError
());
sprintf
(
path3A
,
"%s%s%s"
,
curdirA
,
curdirA
[
strlen
(
curdirA
)
-
1
]
!=
'\\'
?
"
\\
"
:
""
,
kernel32A
);
GetModuleFileNameA
(
GetModuleHandleA
(
0
),
path3A
,
sizeof
(
path3A
)
);
strcpy
(
strrchr
(
path3A
,
'\\'
)
+
1
,
kernel32A
);
bret
=
CopyFileA
(
path2A
,
path3A
,
FALSE
);
ok
(
bret
!=
0
,
"failed to copy test executable to launch directory, %u
\n
"
,
GetLastError
());
bret
=
SetCurrentDirectoryA
(
tmpdirA
);
...
...
dlls/kernel32/tests/process.c
View file @
8a5e6030
...
...
@@ -935,6 +935,11 @@ static void test_CommandLine(void)
release_memory
();
DeleteFileA
(
resfile
);
GetFullPathNameA
(
selfname
,
MAX_PATH
,
fullpath
,
&
lpFilePart
);
assert
(
lpFilePart
!=
0
);
*
(
lpFilePart
-
1
)
=
0
;
SetCurrentDirectoryA
(
fullpath
);
/* Test for Bug1330 to show that XP doesn't change '/' to '\\' in argv[0]
* and " escaping.
*/
...
...
@@ -970,9 +975,6 @@ static void test_CommandLine(void)
DeleteFileA
(
resfile
);
get_file_name
(
resfile
);
GetFullPathNameA
(
selfname
,
MAX_PATH
,
fullpath
,
&
lpFilePart
);
assert
(
lpFilePart
!=
0
);
*
(
lpFilePart
-
1
)
=
0
;
p
=
strrchr
(
fullpath
,
'\\'
);
/* Use exename to avoid buffer containing things like 'C:' */
if
(
p
)
sprintf
(
buffer
,
"..%s/%s process dump
\"
%s
\"
"
,
p
,
exename
,
resfile
);
...
...
@@ -1010,6 +1012,7 @@ static void test_CommandLine(void)
okChildStringWA
(
"Arguments"
,
"CommandLineW"
,
buffer2
);
release_memory
();
DeleteFileA
(
resfile
);
SetCurrentDirectoryA
(
base
);
if
(
0
)
/* Test crashes on NT-based Windows. */
{
...
...
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