Zhenbo Li : shell32/tests: Add tests for SHFileOperationA.
Alexandre Julliard
julliard at winehq.org
Mon Nov 11 14:08:16 CST 2013
Module: wine
Branch: master
Commit: 7c1602464a9d8fb65663ff92de84b4888a1ac479
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7c1602464a9d8fb65663ff92de84b4888a1ac479
Author: Zhenbo Li <litimetal at gmail.com>
Date: Mon Nov 11 23:52:31 2013 +0800
shell32/tests: Add tests for SHFileOperationA.
---
dlls/shell32/tests/shlfileop.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index a62292b..bb15054 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -646,6 +646,19 @@ static void test_delete(void)
else
skip("Test would show a dialog box\n");
+ /* delete an existent file and a nonexistent file */
+ shfo.pFrom = "test1.txt\0nonexistent.txt\0test2.txt\0";
+ shfo.wFunc = FO_DELETE;
+ ret = SHFileOperationA(&shfo);
+ todo_wine
+ ok(ret == 1026 ||
+ ret == ERROR_FILE_NOT_FOUND || /* Vista */
+ broken(ret == ERROR_SUCCESS), /* NT4 */
+ "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", ret);
+ todo_wine
+ ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
+ ok(file_exists("test2.txt"), "Expected test2.txt to exist\n");
+
/* try the FOF_NORECURSION flag, continues deleting subdirs */
init_shfo_tests();
shfo.pFrom = "testdir2\0";
More information about the wine-cvs
mailing list