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
a79868e0
Commit
a79868e0
authored
Jan 27, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Don't hardcode C drive for SetCurrentDirectory tests.
Also handle the case where TMP and TEMP are not defined.
parent
e55a691d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
path.c
dlls/kernel32/tests/path.c
+16
-10
No files found.
dlls/kernel32/tests/path.c
View file @
a79868e0
...
...
@@ -468,10 +468,10 @@ static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir)
/* change to root without a trailing backslash. The function call succeeds
but the directory is not changed.
*/
s
trcpy
(
tmpstr
,
"C:"
);
s
printf
(
tmpstr
,
"%c:"
,
newdir
[
0
]
);
test_setdir
(
newdir
,
tmpstr
,
newdir
,
1
,
"check 10"
);
/* works however with a trailing backslash */
s
trcpy
(
tmpstr
,
"C:
\\
"
);
s
printf
(
tmpstr
,
"%c:
\\
"
,
newdir
[
0
]
);
test_setdir
(
newdir
,
tmpstr
,
NULL
,
1
,
"check 11"
);
}
...
...
@@ -901,15 +901,18 @@ static void test_GetTempPath(void)
char
windir
[
MAX_PATH
];
char
buf
[
MAX_PATH
];
GetEnvironmentVariableA
(
"TMP"
,
save_TMP
,
sizeof
(
save_TMP
))
;
if
(
!
GetEnvironmentVariableA
(
"TMP"
,
save_TMP
,
sizeof
(
save_TMP
)))
save_TMP
[
0
]
=
0
;
/* test default configuration */
trace
(
"TMP=%s
\n
"
,
save_TMP
);
strcpy
(
buf
,
save_TMP
);
if
(
buf
[
strlen
(
buf
)
-
1
]
!=
'\\'
)
strcat
(
buf
,
"
\\
"
);
test_GetTempPathA
(
buf
);
test_GetTempPathW
(
buf
);
if
(
save_TMP
[
0
])
{
strcpy
(
buf
,
save_TMP
);
if
(
buf
[
strlen
(
buf
)
-
1
]
!=
'\\'
)
strcat
(
buf
,
"
\\
"
);
test_GetTempPathA
(
buf
);
test_GetTempPathW
(
buf
);
}
/* TMP=C:\WINDOWS */
GetWindowsDirectoryA
(
windir
,
sizeof
(
windir
));
...
...
@@ -1216,8 +1219,11 @@ static void test_drive_letter_case(void)
ret
=
GetTempPath
(
sizeof
(
buf
),
buf
);
ok
(
ret
,
"GetTempPath error %u
\n
"
,
GetLastError
());
ok
(
ret
<
sizeof
(
buf
),
"buffer should be %u bytes
\n
"
,
ret
);
ok
(
buf
[
1
]
==
':'
,
"expected buf[1] == ':' got %c
\n
"
,
buf
[
1
]);
ok
(
buf
[
strlen
(
buf
)
-
1
]
==
'\\'
,
"Temporary path (%s) doesn't end in a slash
\n
"
,
buf
);
if
(
buf
[
0
])
{
ok
(
buf
[
1
]
==
':'
,
"expected buf[1] == ':' got %c
\n
"
,
buf
[
1
]);
ok
(
buf
[
strlen
(
buf
)
-
1
]
==
'\\'
,
"Temporary path (%s) doesn't end in a slash
\n
"
,
buf
);
}
memset
(
buf
,
0
,
sizeof
(
buf
));
SetLastError
(
0xdeadbeef
);
...
...
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