shell32/tests: Add a todo for two recycle bin tests in case no item was added.

Octavian Voicu octavian.voicu at gmail.com
Thu Sep 1 01:53:02 CDT 2011


--
Converts two test failures on Wine to TODOs. These failures happen when the
test file being deleted is not on the same device as the user's homedir
(where the trash is stored).

Currently, moving to trash is implemented with the rename syscall, which
cannot cross device boundaries. In this case the file/folder is simply
deleted, and doesn't go to the recycle bin. On native there is a trash
on each drive.

Failures are here: http://test.winehq.org/data/c268c40fdf0ecf904769ad2e7fba23884f967c1e/linux_ov-ku1104-win32/shell32:recyclebin.html

---
 dlls/shell32/tests/recyclebin.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/tests/recyclebin.c b/dlls/shell32/tests/recyclebin.c
index 2fa4d3e..391e025 100644
--- a/dlls/shell32/tests/recyclebin.c
+++ b/dlls/shell32/tests/recyclebin.c
@@ -90,8 +90,13 @@ static void test_query_recyclebin(void)
     ok(!pSHFileOperationA(&shfo), "Deletion was not successful\n");
     hr = pSHQueryRecycleBinA(buf,&info2);
     ok(hr == S_OK, "SHQueryRecycleBinW failed with error 0x%x\n", hr);
-    ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written));
-    ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1));
+    if(info2.i64Size!=info1.i64Size || info2.i64NumItems!=info1.i64NumItems) {
+      ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written));
+      ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1));
+    } else todo_wine {
+      ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written));
+      ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1));
+    }
 }
 
 
-- 
1.7.4.1




More information about the wine-patches mailing list