Commit a42f4b65 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

advpack: Remove a test that fails inconsistently on several platforms.

parent 88f47051
......@@ -103,36 +103,6 @@ static BOOL check_ini_file_attr(LPSTR filename)
return ret;
}
#define FIELD_LEN 16
static BOOL check_ini_contents(LPSTR filename, BOOL add)
{
CHAR field[FIELD_LEN];
BOOL ret = TRUE, match;
GetPrivateProfileStringA("backup", "one", NULL, field, FIELD_LEN, filename);
match = !lstrcmpA(field, "-1,0,0,0,0,0,-1");
if ((add && !match) || (!add && match)) {
trace("first test: got %s\n", field);
ret = FALSE;
}
GetPrivateProfileStringA("backup", "two", NULL, field, FIELD_LEN, filename);
if (lstrcmpA(field, "-1,0,0,0,0,0,-1")) {
trace("second test: got %s\n", field);
ret = FALSE;
}
GetPrivateProfileStringA("backup", "three", NULL, field, FIELD_LEN, filename);
match = !lstrcmpA(field, "-1,0,0,0,0,0,-1");
if ((add && !match) || (!add && match)) {
trace("third test: got %s\n", field);
ret = FALSE;
}
return ret;
}
static void test_AddDelBackupEntry(void)
{
HRESULT res;
......@@ -171,7 +141,6 @@ static void test_AddDelBackupEntry(void)
res = pAddDelBackupEntry("one\0two\0three\0", "c:\\", "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
ok(DeleteFileA(path), "Expected path to exist\n");
lstrcpyA(path, CURR_DIR);
......@@ -182,7 +151,6 @@ static void test_AddDelBackupEntry(void)
res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(!check_ini_file_attr(path), "Expected ini file to not be hidden\n");
ok(!check_ini_contents(path, TRUE), "Expected ini contents to not match\n");
ok(!DeleteFileA(path), "Expected path to not exist\n");
/* try an existent, relative backup directory */
......@@ -190,7 +158,6 @@ static void test_AddDelBackupEntry(void)
res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
ok(DeleteFileA(path), "Expected path to exist\n");
RemoveDirectoryA("backup");
......@@ -200,14 +167,12 @@ static void test_AddDelBackupEntry(void)
/* try a NULL backup dir, INI is created in the windows directory */
res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(check_ini_contents(path, TRUE), "Expected ini contents to match\n");
/* remove the entries with AADBE_DEL_ENTRY */
SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL);
res = pAddDelBackupEntry("one\0three\0", NULL, "basename", AADBE_DEL_ENTRY);
SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(check_ini_contents(path, FALSE), "Expected ini contents to match\n");
ok(DeleteFileA(path), "Expected path to exist\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment