mirror of
https://github.com/reactos/wine.git
synced 2025-03-01 09:16:00 +00:00
msi/tests: Fix a test for systems with %TEMP% being less than 2 levels deep.
This commit is contained in:
parent
40cfbaf023
commit
7a8000d4e8
@ -4193,8 +4193,8 @@ static void test_transformprop(void)
|
|||||||
static void test_currentworkingdir(void)
|
static void test_currentworkingdir(void)
|
||||||
{
|
{
|
||||||
UINT r;
|
UINT r;
|
||||||
CHAR path[MAX_PATH];
|
CHAR drive[MAX_PATH], path[MAX_PATH];
|
||||||
LPSTR ptr, ptr2;
|
LPSTR ptr;
|
||||||
|
|
||||||
CreateDirectoryA("msitest", NULL);
|
CreateDirectoryA("msitest", NULL);
|
||||||
create_file("msitest\\augustus", 500);
|
create_file("msitest\\augustus", 500);
|
||||||
@ -4221,18 +4221,17 @@ static void test_currentworkingdir(void)
|
|||||||
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
|
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "File not installed\n");
|
ok(delete_pf("msitest", FALSE), "File not installed\n");
|
||||||
|
|
||||||
lstrcpyA(path, CURR_DIR);
|
lstrcpyA(drive, CURR_DIR);
|
||||||
|
drive[2] = '\\';
|
||||||
|
drive[3] = '\0';
|
||||||
|
SetCurrentDirectoryA(drive);
|
||||||
|
|
||||||
|
lstrcpy(path, CURR_DIR);
|
||||||
if (path[lstrlenA(path) - 1] != '\\')
|
if (path[lstrlenA(path) - 1] != '\\')
|
||||||
lstrcatA(path, "\\");
|
lstrcatA(path, "\\");
|
||||||
lstrcatA(path, "msitest.msi");
|
lstrcatA(path, msifile);
|
||||||
|
ptr = strchr(path, ':');
|
||||||
ptr2 = strrchr(path, '\\');
|
ptr +=2;
|
||||||
*ptr2 = '\0';
|
|
||||||
ptr = strrchr(path, '\\');
|
|
||||||
*ptr2 = '\\';
|
|
||||||
*(ptr++) = '\0';
|
|
||||||
|
|
||||||
SetCurrentDirectoryA(path);
|
|
||||||
|
|
||||||
r = MsiInstallProductA(ptr, NULL);
|
r = MsiInstallProductA(ptr, NULL);
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user