msi/tests: Fix package test when run on root drive directory.
Nicolas Le Cam
niko.lecam at gmail.com
Thu Apr 9 20:27:22 CDT 2009
---
dlls/msi/tests/package.c | 132 ++++++++++++++++++++++++++--------------------
1 files changed, 74 insertions(+), 58 deletions(-)
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 880dbbb..555d2f9 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -32,6 +32,7 @@
static const char msifile[] = "winetest.msi";
char CURR_DIR[MAX_PATH];
char WIN_DIR[MAX_PATH];
+DWORD DIR_LEN;
static void get_user_sid(LPSTR *usersid)
{
@@ -222,7 +223,6 @@ static void set_component_path(LPCSTR filename, MSIINSTALLCONTEXT context,
RegCreateKeyA(HKEY_LOCAL_MACHINE, comppath, &hkey);
lstrcpyA(path, CURR_DIR);
- lstrcatA(path, "\\");
if (!dir) lstrcatA(path, filename);
RegSetValueExA(hkey, prod, 0, REG_SZ, (LPBYTE)path, lstrlenA(path));
@@ -7513,43 +7513,43 @@ static void test_appsearch_complocator(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
size = MAX_PATH;
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName2", CURR_DIR);
+ sprintf(path, "%sFileName2", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName3", CURR_DIR);
+ sprintf(path, "%sFileName3", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName4", CURR_DIR);
+ sprintf(path, "%sFileName4", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName5", CURR_DIR);
+ sprintf(path, "%sFileName5", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -7565,7 +7565,7 @@ static void test_appsearch_complocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName8.dll", CURR_DIR);
+ sprintf(path, "%sFileName8.dll", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP10", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -7576,7 +7576,7 @@ static void test_appsearch_complocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName10.dll", CURR_DIR);
+ sprintf(path, "%sFileName10.dll", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP12", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -7709,12 +7709,12 @@ static void test_appsearch_reglocator(void)
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
create_test_file("FileName1");
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
res = RegSetValueExA(hklm, "Value9", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
- sprintf(path, "%s\\FileName2", CURR_DIR);
+ sprintf(path, "%sFileName2", CURR_DIR);
res = RegSetValueExA(hklm, "Value10", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
@@ -7729,29 +7729,29 @@ static void test_appsearch_reglocator(void)
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
create_file_with_version("FileName3.dll", MAKELONG(2, 1), MAKELONG(4, 3));
- sprintf(path, "%s\\FileName3.dll", CURR_DIR);
+ sprintf(path, "%sFileName3.dll", CURR_DIR);
res = RegSetValueExA(hklm, "Value13", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
create_file_with_version("FileName4.dll", MAKELONG(1, 2), MAKELONG(3, 4));
- sprintf(path, "%s\\FileName4.dll", CURR_DIR);
+ sprintf(path, "%sFileName4.dll", CURR_DIR);
res = RegSetValueExA(hklm, "Value14", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
create_file_with_version("FileName5.dll", MAKELONG(2, 1), MAKELONG(4, 3));
- sprintf(path, "%s\\FileName5.dll", CURR_DIR);
+ sprintf(path, "%sFileName5.dll", CURR_DIR);
res = RegSetValueExA(hklm, "Value15", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
- sprintf(path, "\"%s\\FileName1\" -option", CURR_DIR);
+ sprintf(path, "\"%sFileName1\" -option", CURR_DIR);
res = RegSetValueExA(hklm, "value16", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
space = (strchr(CURR_DIR, ' ')) ? TRUE : FALSE;
- sprintf(path, "%s\\FileName1 -option", CURR_DIR);
+ sprintf(path, "%sFileName1 -option", CURR_DIR);
res = RegSetValueExA(hklm, "value17", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
@@ -8031,7 +8031,14 @@ static void test_appsearch_reglocator(void)
r = add_signature_entry(hdb, str);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ptr = strrchr(CURR_DIR, '\\') + 1;
+ if (DIR_LEN > 3)
+ {
+ lstrcpyA(prop, CURR_DIR);
+ prop[DIR_LEN-1] = '\0';
+ ptr = strrchr(prop, '\\') + 1;
+ }
+ else
+ ptr = CURR_DIR;
sprintf(path, "'NewSignature26', '%s', '', '', '', '', '', '', ''", ptr);
r = add_signature_entry(hdb, path);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -8121,7 +8128,7 @@ static void test_appsearch_reglocator(void)
"Expected \"##regszdata\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP9", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8132,7 +8139,7 @@ static void test_appsearch_reglocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8143,7 +8150,7 @@ static void test_appsearch_reglocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP13", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8193,7 +8200,7 @@ static void test_appsearch_reglocator(void)
if (version)
{
size = MAX_PATH;
- sprintf(path, "%s\\FileName3.dll", CURR_DIR);
+ sprintf(path, "%sFileName3.dll", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP21", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8204,7 +8211,7 @@ static void test_appsearch_reglocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName5.dll", CURR_DIR);
+ sprintf(path, "%sFileName5.dll", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP23", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8212,14 +8219,19 @@ static void test_appsearch_reglocator(void)
size = MAX_PATH;
lstrcpyA(path, CURR_DIR);
- ptr = strrchr(path, '\\') + 1;
- *ptr = '\0';
+ if (DIR_LEN > 3)
+ {
+ path[DIR_LEN-1] = '\0';
+ ptr = strrchr(path, '\\') + 1;
+ *ptr = '\0';
+ }
r = MsiGetPropertyA(hpkg, "SIGPROP24", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ todo_wine
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP25", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8240,13 +8252,13 @@ static void test_appsearch_reglocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP29", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP30", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
if (space)
@@ -8324,24 +8336,24 @@ static void test_appsearch_inilocator(void)
WritePrivateProfileStringA("Section", "Key", "keydata,field2", "IniFile.ini");
create_test_file("FileName1");
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
WritePrivateProfileStringA("Section", "Key2", path, "IniFile.ini");
WritePrivateProfileStringA("Section", "Key3", CURR_DIR, "IniFile.ini");
- sprintf(path, "%s\\IDontExist", CURR_DIR);
+ sprintf(path, "%sIDontExist", CURR_DIR);
WritePrivateProfileStringA("Section", "Key4", path, "IniFile.ini");
create_file_with_version("FileName2.dll", MAKELONG(2, 1), MAKELONG(4, 3));
- sprintf(path, "%s\\FileName2.dll", CURR_DIR);
+ sprintf(path, "%sFileName2.dll", CURR_DIR);
WritePrivateProfileStringA("Section", "Key5", path, "IniFile.ini");
create_file_with_version("FileName3.dll", MAKELONG(1, 2), MAKELONG(3, 4));
- sprintf(path, "%s\\FileName3.dll", CURR_DIR);
+ sprintf(path, "%sFileName3.dll", CURR_DIR);
WritePrivateProfileStringA("Section", "Key6", path, "IniFile.ini");
create_file_with_version("FileName4.dll", MAKELONG(2, 1), MAKELONG(4, 3));
- sprintf(path, "%s\\FileName4.dll", CURR_DIR);
+ sprintf(path, "%sFileName4.dll", CURR_DIR);
WritePrivateProfileStringA("Section", "Key7", path, "IniFile.ini");
hdb = create_package_db();
@@ -8490,7 +8502,7 @@ static void test_appsearch_inilocator(void)
"Expected \"keydata,field2\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8501,23 +8513,28 @@ static void test_appsearch_inilocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
lstrcpyA(path, CURR_DIR);
- ptr = strrchr(path, '\\');
- *(ptr + 1) = '\0';
+ if (DIR_LEN > 3)
+ {
+ path[DIR_LEN-1] = '\0';
+ ptr = strrchr(path, '\\');
+ *(ptr + 1) = '\0';
+ }
r = MsiGetPropertyA(hpkg, "SIGPROP8", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ todo_wine
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
@@ -8528,7 +8545,7 @@ static void test_appsearch_inilocator(void)
if (version)
{
size = MAX_PATH;
- sprintf(path, "%s\\FileName2.dll", CURR_DIR);
+ sprintf(path, "%sFileName2.dll", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP10", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8539,7 +8556,7 @@ static void test_appsearch_inilocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\FileName4.dll", CURR_DIR);
+ sprintf(path, "%sFileName4.dll", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP12", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8711,13 +8728,13 @@ static void test_appsearch_drlocator(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
size = MAX_PATH;
- sprintf(path, "%s\\FileName1", CURR_DIR);
+ sprintf(path, "%sFileName1", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
size = MAX_PATH;
- sprintf(path, "%s\\", CURR_DIR);
+ lstrcpyA(path, CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8728,7 +8745,7 @@ static void test_appsearch_drlocator(void)
* system drive (i.e. X:\temp and C:\temp).
*/
size = MAX_PATH;
- sprintf(path, "%.2s\\%s\\", WIN_DIR, CURR_DIR + 3);
+ sprintf(path, "%.2s\\%s", WIN_DIR, CURR_DIR + 3);
r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine
@@ -8742,7 +8759,7 @@ static void test_appsearch_drlocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR);
+ sprintf(path, "%sone\\two\\three\\FileName2", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8753,7 +8770,7 @@ static void test_appsearch_drlocator(void)
ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop);
size = MAX_PATH;
- sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR);
+ sprintf(path, "%sone\\two\\three\\FileName2", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -8761,7 +8778,7 @@ static void test_appsearch_drlocator(void)
if (version)
{
size = MAX_PATH;
- sprintf(path, "%s\\FileName3.dll", CURR_DIR);
+ sprintf(path, "%sFileName3.dll", CURR_DIR);
r = MsiGetPropertyA(hpkg, "SIGPROP8", prop, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop);
@@ -9204,9 +9221,8 @@ static void test_installprops(void)
int res;
UINT r;
- GetCurrentDirectory(MAX_PATH, path);
- lstrcat(path, "\\");
- lstrcat(path, msifile);
+ lstrcpyA(path, CURR_DIR);
+ lstrcatA(path, msifile);
hdb = create_package_db();
ok( hdb, "failed to create database\n");
@@ -9594,7 +9610,7 @@ static void test_complocator(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
lstrcpyA(expected, CURR_DIR);
- lstrcatA(expected, "\\abelisaurus");
+ lstrcatA(expected, "abelisaurus");
ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""),
"Expected %s or empty string, got %s\n", expected, prop);
@@ -9618,7 +9634,6 @@ static void test_complocator(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
lstrcpyA(expected, CURR_DIR);
- lstrcatA(expected, "\\");
ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""),
"Expected %s or empty string, got %s\n", expected, prop);
@@ -9662,7 +9677,6 @@ static void test_complocator(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
lstrcpyA(expected, CURR_DIR);
- lstrcatA(expected, "\\");
ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""),
"Expected %s or empty string, got %s\n", expected, prop);
@@ -9671,7 +9685,7 @@ static void test_complocator(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
lstrcpyA(expected, CURR_DIR);
- lstrcatA(expected, "\\neosodon\\");
+ lstrcatA(expected, "neosodon\\");
ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""),
"Expected %s or empty string, got %s\n", expected, prop);
@@ -9749,7 +9763,6 @@ static void test_MsiGetSourcePath(void)
UINT r;
lstrcpyA(cwd, CURR_DIR);
- lstrcatA(cwd, "\\");
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "subsource");
@@ -10185,7 +10198,6 @@ static void test_shortlongsource(void)
UINT r;
lstrcpyA(cwd, CURR_DIR);
- lstrcatA(cwd, "\\");
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "long");
@@ -10520,7 +10532,6 @@ static void test_sourcedir(void)
UINT r;
lstrcpyA(cwd, CURR_DIR);
- lstrcatA(cwd, "\\");
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "long");
@@ -11177,7 +11188,7 @@ static void test_MsiGetProductProperty(void)
}
CloseServiceHandle(scm);
- GetCurrentDirectoryA(MAX_PATH, path);
+ lstrcpyA(path, CURR_DIR);
lstrcatA(path, "\\");
create_test_guid(prodcode, prod_squashed);
@@ -11493,7 +11504,12 @@ static void test_MsiSetProperty(void)
START_TEST(package)
{
GetWindowsDirectoryA(WIN_DIR, MAX_PATH);
- GetCurrentDirectoryA(MAX_PATH, CURR_DIR);
+ DIR_LEN = GetCurrentDirectoryA(MAX_PATH, CURR_DIR);
+ if (DIR_LEN > 3 && CURR_DIR[DIR_LEN - 1] != '\\')
+ {
+ ++DIR_LEN;
+ lstrcatA(CURR_DIR, "\\");
+ }
test_createpackage();
test_doaction();
--
1.6.0.4
--=-qxkYpOx3aI+0nKVpVK4l--
More information about the wine-patches
mailing list