Zhenbo Li : shell32/tests: Delete a nonexistent file in an existent dir or a nonexistent dir.

Alexandre Julliard julliard at winehq.org
Wed Nov 20 13:38:58 CST 2013


Module: wine
Branch: master
Commit: fa8e8c258c62c5aa54285e09687b37fd72935c71
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fa8e8c258c62c5aa54285e09687b37fd72935c71

Author: Zhenbo Li <litimetal at gmail.com>
Date:   Wed Nov 20 07:15:57 2013 +0800

shell32/tests: Delete a nonexistent file in an existent dir or a nonexistent dir.

---

 dlls/shell32/tests/shlfileop.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index cd93ce5..14ace24 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -660,6 +660,22 @@ static void test_delete(void)
     ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
     ok(file_exists("test2.txt"), "Expected test2.txt to exist\n");
 
+    /* delete a nonexistent file in an existent dir or a nonexistent dir */
+    init_shfo_tests();
+    shfo.pFrom = "testdir2\\nonexistent.txt\0";
+    ret = SHFileOperationA(&shfo);
+    todo_wine
+    ok(ret == ERROR_FILE_NOT_FOUND || /* Vista */
+       broken(ret == 0x402) || /* XP */
+       broken(ret == ERROR_SUCCESS), /* NT4 */
+       "Expected 0x402 or ERROR_FILE_NOT_FOUND, got %x\n", ret);
+    shfo.pFrom = "nonexistent\\one.txt\0";
+    ret = SHFileOperationA(&shfo);
+    todo_wine
+    ok(ret == DE_INVALIDFILES || /* Vista or later */
+       broken(ret == 0x402), /* XP */
+       "Expected 0x402 or DE_INVALIDFILES, got %x\n", ret);
+
     /* try the FOF_NORECURSION flag, continues deleting subdirs */
     init_shfo_tests();
     shfo.pFrom = "testdir2\0";




More information about the wine-cvs mailing list