From 96c6ad4aa73a202f87349b924c4e2421fc2e73a4 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 20 Sep 2013 16:01:26 +0900 Subject: [PATCH] kernel32/tests: Add FILE_APPEND_DATA case to the file access tests. --- dlls/kernel32/tests/file.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 288fc5e5f74..a428672d65e 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); }