Module: wine Branch: master Commit: 96c6ad4aa73a202f87349b924c4e2421fc2e73a4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=96c6ad4aa73a202f87349b924c...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Sep 20 16:01:26 2013 +0900
kernel32/tests: Add FILE_APPEND_DATA case to the file access tests.
---
dlls/kernel32/tests/file.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 288fc5e..a428672 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -3903,6 +3903,9 @@ static void test_file_access(void) { FILE_READ_DATA | FILE_WRITE_DATA, 0, 0, 0 }, { FILE_WRITE_DATA, 0, 0, ERROR_ACCESS_DENIED }, { FILE_READ_DATA, 0, ERROR_ACCESS_DENIED, 0 }, + { FILE_APPEND_DATA, 0, 0, ERROR_ACCESS_DENIED }, + { FILE_READ_DATA | FILE_APPEND_DATA, 0, 0, 0 }, + { FILE_WRITE_DATA | FILE_APPEND_DATA, 0, 0, ERROR_ACCESS_DENIED }, { 0, 0, ERROR_ACCESS_DENIED, ERROR_ACCESS_DENIED }, }; char path[MAX_PATH], fname[MAX_PATH]; @@ -3938,6 +3941,17 @@ static void test_file_access(void) } else { + /* FIXME: remove once Wine is fixed */ + if (!ret && (td[i].access & FILE_APPEND_DATA)) + { +todo_wine + ok(ret, "%d: WriteFile error %d\n", i, GetLastError()); +todo_wine + ok(bytes == 2, "%d: expected 2, got %u\n", i, bytes); + CloseHandle(hfile); + continue; + } + ok(ret, "%d: WriteFile error %d\n", i, GetLastError()); ok(bytes == 2, "%d: expected 2, got %u\n", i, bytes); }