James Hawkins : advpack: Don't test properties of a file if it can' t be created.
Alexandre Julliard
julliard at winehq.org
Mon Jan 26 10:15:00 CST 2009
Module: wine
Branch: master
Commit: 99e7287ed7d07f57adb9ef3b3f3bb78b748c9146
URL: http://source.winehq.org/git/wine.git/?a=commit;h=99e7287ed7d07f57adb9ef3b3f3bb78b748c9146
Author: James Hawkins <truiken at gmail.com>
Date: Mon Jan 26 01:31:08 2009 -0600
advpack: Don't test properties of a file if it can't be created.
---
dlls/advpack/tests/files.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/advpack/tests/files.c b/dlls/advpack/tests/files.c
index d3f7338..5c6ea8d 100644
--- a/dlls/advpack/tests/files.c
+++ b/dlls/advpack/tests/files.c
@@ -133,8 +133,13 @@ static void test_AddDelBackupEntry(void)
/* create the INF file */
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(DeleteFileA(path), "Expected path to exist\n");
+ if (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES)
+ {
+ ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
+ ok(DeleteFileA(path), "Expected path to exist\n");
+ }
+ else
+ win_skip("Test file could not be created\n");
lstrcpyA(path, CURR_DIR);
lstrcatA(path, "\\backup\\basename.INI");
More information about the wine-cvs
mailing list