A+ ---
Eric Pouech (9): programs/conhost/tests: enable compilation with long types programs/find/tests: enable compilation with long types programs/fsutil/tests: enable compilation with long types programs/regedit/tests: enable compilation with long types programs/reg/tests: enable compilation with long types programs/schtasks/tests: enable compilation with long types programs/services/tests: enable compilation with long types programs/wscript/tests: enable compilation with long types programs/xcopy/tests: enable compilation with long types
programs/conhost/tests/Makefile.in | 1 - programs/conhost/tests/tty.c | 128 ++--- programs/find/tests/Makefile.in | 1 - programs/find/tests/find.c | 2 +- programs/fsutil/tests/Makefile.in | 1 - programs/fsutil/tests/fsutil.c | 6 +- programs/reg/tests/Makefile.in | 1 - programs/reg/tests/add.c | 302 +++++----- programs/reg/tests/copy.c | 192 +++---- programs/reg/tests/delete.c | 114 ++-- programs/reg/tests/export.c | 98 ++-- programs/reg/tests/import.c | 816 ++++++++++++++-------------- programs/reg/tests/query.c | 94 ++-- programs/regedit/tests/Makefile.in | 1 - programs/regedit/tests/regedit.c | 80 +-- programs/schtasks/tests/Makefile.in | 1 - programs/schtasks/tests/schtasks.c | 42 +- programs/services/tests/Makefile.in | 1 - programs/services/tests/service.c | 150 ++--- programs/wscript/tests/Makefile.in | 1 - programs/wscript/tests/run.c | 14 +- programs/xcopy/tests/Makefile.in | 1 - programs/xcopy/tests/xcopy.c | 14 +- 23 files changed, 1026 insertions(+), 1035 deletions(-)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/conhost/tests/Makefile.in | 1 programs/conhost/tests/tty.c | 128 ++++++++++++++++++------------------ 2 files changed, 64 insertions(+), 65 deletions(-)
diff --git a/programs/conhost/tests/Makefile.in b/programs/conhost/tests/Makefile.in index 831c2afd457..ecaf68fe4b2 100644 --- a/programs/conhost/tests/Makefile.in +++ b/programs/conhost/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = conhost.exe IMPORTS = user32
diff --git a/programs/conhost/tests/tty.c b/programs/conhost/tests/tty.c index 0e459ef3654..eab3c37f0d9 100644 --- a/programs/conhost/tests/tty.c +++ b/programs/conhost/tests/tty.c @@ -43,7 +43,7 @@ static void fetch_console_output_(unsigned int line) sizeof(console_output) - console_output_count, NULL, &o); if (!ret) { - ok_(__FILE__,line)(GetLastError() == ERROR_IO_PENDING, "read failed: %u\n", GetLastError()); + ok_(__FILE__,line)(GetLastError() == ERROR_IO_PENDING, "read failed: %lu\n", GetLastError()); if (GetLastError() != ERROR_IO_PENDING) return; WaitForSingleObject(o.hEvent, 5000); } @@ -51,7 +51,7 @@ static void fetch_console_output_(unsigned int line) if (!ret && GetLastError() == ERROR_IO_INCOMPLETE) CancelIoEx(console_pipe, &o);
- ok_(__FILE__,line)(ret, "Read file failed: %u\n", GetLastError()); + ok_(__FILE__,line)(ret, "Read file failed: %lu\n", GetLastError()); CloseHandle(o.hEvent); if (ret) console_output_count += count; } @@ -63,8 +63,8 @@ static void expect_empty_output_(unsigned int line) BOOL ret;
ret = PeekNamedPipe(console_pipe, NULL, 0, NULL, &avail, NULL); - ok_(__FILE__,line)(ret, "PeekNamedPipe failed: %u\n", GetLastError()); - ok_(__FILE__,line)(!avail, "avail = %u\n", avail); + ok_(__FILE__,line)(ret, "PeekNamedPipe failed: %lu\n", GetLastError()); + ok_(__FILE__,line)(!avail, "avail = %lu\n", avail); if (avail) fetch_console_output_(line); ok_(__FILE__,line)(!console_output_count, "expected empty buffer, got %s\n", wine_dbgstr_an(console_output, console_output_count)); @@ -216,7 +216,7 @@ static void child_string_request(enum req_type type, const WCHAR *title) memcpy(req->u.string, title, len * sizeof(WCHAR)); ret = WriteFile(child_pipe, req, FIELD_OFFSET(struct pseudoconsole_req, u.string[len]), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_write_characters(const WCHAR *buf, unsigned int x, unsigned int y) @@ -234,7 +234,7 @@ static void child_write_characters(const WCHAR *buf, unsigned int x, unsigned in memcpy(req->u.write_characters.buf, buf, len * sizeof(WCHAR)); ret = WriteFile(child_pipe, req, FIELD_OFFSET(struct pseudoconsole_req, u.write_characters.buf[len + 1]), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_set_cursor(const unsigned int x, unsigned int y) @@ -247,7 +247,7 @@ static void child_set_cursor(const unsigned int x, unsigned int y) req.u.coord.X = x; req.u.coord.Y = y; ret = WriteFile(child_pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static HANDLE child_create_screen_buffer(void) @@ -259,9 +259,9 @@ static HANDLE child_create_screen_buffer(void)
req.type = REQ_CREATE_SCREEN_BUFFER; ret = WriteFile(child_pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); ret = ReadFile(child_pipe, &handle, sizeof(handle), &count, NULL); - ok(ret, "ReadFile failed: %u\n", GetLastError()); + ok(ret, "ReadFile failed: %lu\n", GetLastError()); return handle; }
@@ -274,7 +274,7 @@ static void child_set_active(HANDLE handle) req.type = REQ_SET_ACTIVE; req.u.handle = handle; ret = WriteFile(child_pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
#define child_write_output(a,b,c,d,e,f,g,h,j,k,l,m,n) child_write_output_(__LINE__,a,b,c,d,e,f,g,h,j,k,l,m,n) @@ -300,9 +300,9 @@ static void child_write_output_(unsigned int line, CHAR_INFO *buf, unsigned int req->u.write_output.region.Bottom = bottom; memcpy(req->u.write_output.buf, buf, size_x * size_y * sizeof(*buf)); ret = WriteFile(child_pipe, req, FIELD_OFFSET(struct pseudoconsole_req, u.write_output.buf[size_x * size_y]), &count, NULL); - ok_(__FILE__,line)(ret, "WriteFile failed: %u\n", GetLastError()); + ok_(__FILE__,line)(ret, "WriteFile failed: %lu\n", GetLastError()); ret = ReadFile(child_pipe, ®ion, sizeof(region), &count, NULL); - ok_(__FILE__,line)(ret, "WriteFile failed: %u\n", GetLastError()); + ok_(__FILE__,line)(ret, "WriteFile failed: %lu\n", GetLastError()); ok_(__FILE__,line)(region.Left == out_left, "Left = %u\n", region.Left); ok_(__FILE__,line)(region.Top == out_top, "Top = %u\n", region.Top); ok_(__FILE__,line)(region.Right == out_right, "Right = %u\n", region.Right); @@ -326,7 +326,7 @@ static void child_scroll(unsigned int src_left, unsigned int src_top, unsigned i req.u.scroll.fill.Char.UnicodeChar = fill; req.u.scroll.fill.Attributes = 0; ret = WriteFile(child_pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_fill_character(WCHAR ch, DWORD count, int x, int y) @@ -340,7 +340,7 @@ static void child_fill_character(WCHAR ch, DWORD count, int x, int y) req.u.fill.coord.X = x; req.u.fill.coord.Y = y; ret = WriteFile(child_pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_set_input_mode(HANDLE pipe, DWORD mode) @@ -352,7 +352,7 @@ static void child_set_input_mode(HANDLE pipe, DWORD mode) req.type = REQ_SET_INPUT_MODE; req.u.mode = mode; ret = WriteFile(pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_set_output_mode(DWORD mode) @@ -364,7 +364,7 @@ static void child_set_output_mode(DWORD mode) req.type = REQ_SET_OUTPUT_MODE; req.u.mode = mode; ret = WriteFile(child_pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_set_input_cp(int cp) @@ -376,7 +376,7 @@ static void child_set_input_cp(int cp) req.type = REQ_SET_INPUT_CP; req.u.cp = cp; ret = WriteFile(child_pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_read_console(HANDLE pipe, size_t size) @@ -388,7 +388,7 @@ static void child_read_console(HANDLE pipe, size_t size) req.type = REQ_READ_CONSOLE; req.u.size = size; ret = WriteFile(pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_read_console_a(HANDLE pipe, size_t size) @@ -400,7 +400,7 @@ static void child_read_console_a(HANDLE pipe, size_t size) req.type = REQ_READ_CONSOLE_A; req.u.size = size; ret = WriteFile(pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
static void child_read_console_file(HANDLE pipe, size_t size) @@ -412,7 +412,7 @@ static void child_read_console_file(HANDLE pipe, size_t size) req.type = REQ_READ_CONSOLE_FILE; req.u.size = size; ret = WriteFile(pipe, &req, sizeof(req), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); }
#define child_expect_read_result(a,b) child_expect_read_result_(__LINE__,a,b) @@ -424,8 +424,8 @@ static void child_expect_read_result_(unsigned int line, HANDLE pipe, const WCHA BOOL ret;
ret = ReadFile(pipe, buf, sizeof(buf), &count, NULL); - ok_(__FILE__,line)(ret, "ReadFile failed: %u\n", GetLastError()); - ok_(__FILE__,line)(count == exlen * sizeof(WCHAR), "got %u, expected %u\n", + ok_(__FILE__,line)(ret, "ReadFile failed: %lu\n", GetLastError()); + ok_(__FILE__,line)(count == exlen * sizeof(WCHAR), "got %lu, expected %Iu\n", count, exlen * sizeof(WCHAR)); buf[count / sizeof(WCHAR)] = 0; ok_(__FILE__,line)(!memcmp(expect, buf, count), "unexpected data %s\n", wine_dbgstr_w(buf)); @@ -440,9 +440,9 @@ static void child_expect_read_result_a_(unsigned int line, HANDLE pipe, const ch BOOL ret;
ret = ReadFile(pipe, buf, sizeof(buf), &count, NULL); - ok_(__FILE__,line)(ret, "ReadFile failed: %u\n", GetLastError()); + ok_(__FILE__,line)(ret, "ReadFile failed: %lu\n", GetLastError()); todo_wine_if(exlen && expect[exlen - 1] == '\xcc') - ok_(__FILE__,line)(count == exlen, "got %u, expected %u\n", count, exlen); + ok_(__FILE__,line)(count == exlen, "got %lu, expected %Iu\n", count, exlen); buf[count] = 0; ok_(__FILE__,line)(!memcmp(expect, buf, count), "unexpected data %s\n", wine_dbgstr_a(buf)); } @@ -455,10 +455,10 @@ static void expect_input(unsigned int event_type, INPUT_RECORD *record) BOOL ret;
ret = WriteFile(child_pipe, &req, sizeof(req), &read, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError());
ret = ReadFile(child_pipe, &input, sizeof(input), &read, NULL); - ok(ret, "ReadFile failed: %u\n", GetLastError()); + ok(ret, "ReadFile failed: %lu\n", GetLastError());
ok(input.EventType == event_type, "EventType = %u, expected %u\n", input.EventType, event_type); if (record) *record = input; @@ -502,7 +502,7 @@ static void expect_key_input_(unsigned int line, unsigned int ctx, WCHAR ch, uns "%x: wVirtualScanCode = %x expected %x\n", ctx, record.Event.KeyEvent.wVirtualScanCode, vs); ok_(__FILE__,line)(record.Event.KeyEvent.dwControlKeyState == ctrl_state, - "%x: dwControlKeyState = %x\n", ctx, record.Event.KeyEvent.dwControlKeyState); + "%x: dwControlKeyState = %lx\n", ctx, record.Event.KeyEvent.dwControlKeyState); }
#define get_input_key_vt() get_input_key_vt_(__LINE__) @@ -561,10 +561,10 @@ static void _test_cursor_pos(unsigned line, int expect_x, int expect_y) BOOL ret;
ret = WriteFile(child_pipe, &req, sizeof(req), &read, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError());
ret = ReadFile(child_pipe, &info, sizeof(info), &read, NULL); - ok(ret, "ReadFile failed: %u\n", GetLastError()); + ok(ret, "ReadFile failed: %lu\n", GetLastError());
ok_(__FILE__,line)(info.dwCursorPosition.X == expect_x, "dwCursorPosition.X = %u, expected %u\n", info.dwCursorPosition.X, expect_x); @@ -1195,7 +1195,7 @@ static void write_console_pipe(const char *buf) DWORD written; BOOL res; res = WriteFile(console_pipe, buf, strlen(buf), &written, NULL); - ok(res, "WriteFile failed: %u\n", GetLastError()); + ok(res, "WriteFile failed: %lu\n", GetLastError()); }
static void test_read_console(void) @@ -1427,9 +1427,9 @@ static void child_process(HANDLE pipe) handle = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(handle != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: %lu\n", GetLastError()); ret = WriteFile(pipe, &handle, sizeof(handle), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); break; }
@@ -1437,10 +1437,10 @@ static void child_process(HANDLE pipe) { INPUT_RECORD record; ret = ReadConsoleInputW(input, &record, 1, &count); - ok(ret, "ReadConsoleInputW failed: %u\n", GetLastError()); - ok(count == 1, "count = %u\n", count); + ok(ret, "ReadConsoleInputW failed: %lu\n", GetLastError()); + ok(count == 1, "count = %lu\n", count); ret = WriteFile(pipe, &record, sizeof(record), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); break; }
@@ -1448,98 +1448,98 @@ static void child_process(HANDLE pipe) { CONSOLE_SCREEN_BUFFER_INFO info; ret = GetConsoleScreenBufferInfo(output, &info); - ok(ret, "GetConsoleScreenBufferInfo failed: %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfo failed: %lu\n", GetLastError()); ret = WriteFile(pipe, &info, sizeof(info), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); break; }
case REQ_READ_CONSOLE: ret = ReadConsoleW(input, buf, req->u.size, &count, NULL ); - ok(ret, "ReadConsoleW failed: %u\n", GetLastError()); + ok(ret, "ReadConsoleW failed: %lu\n", GetLastError()); ret = WriteFile(pipe, buf, count * sizeof(WCHAR), NULL, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); break;
case REQ_READ_CONSOLE_A: count = req->u.size; memset(buf, 0xcc, sizeof(buf)); ret = ReadConsoleA(input, buf, count, &count, NULL ); - ok(ret, "ReadConsoleA failed: %u\n", GetLastError()); + ok(ret, "ReadConsoleA failed: %lu\n", GetLastError()); ret = WriteFile(pipe, buf, count, NULL, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); break;
case REQ_READ_CONSOLE_FILE: count = req->u.size; memset(buf, 0xcc, sizeof(buf)); ret = ReadFile(input, buf, count, &count, NULL ); - ok(ret, "ReadFile failed: %u\n", GetLastError()); + ok(ret, "ReadFile failed: %lu\n", GetLastError()); ret = WriteFile(pipe, buf, count, NULL, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); break;
case REQ_SCROLL: ret = ScrollConsoleScreenBufferW(output, &req->u.scroll.rect, NULL, req->u.scroll.dst, &req->u.scroll.fill); - ok(ret, "ScrollConsoleScreenBuffer failed: %u\n", GetLastError()); + ok(ret, "ScrollConsoleScreenBuffer failed: %lu\n", GetLastError()); break;
case REQ_FILL_CHAR: ret = FillConsoleOutputCharacterW(output, req->u.fill.ch, req->u.fill.count, req->u.fill.coord, &count); - ok(ret, "FillConsoleOutputCharacter failed: %u\n", GetLastError()); - ok(count == req->u.fill.count, "count = %u, expected %u\n", count, req->u.fill.count); + ok(ret, "FillConsoleOutputCharacter failed: %lu\n", GetLastError()); + ok(count == req->u.fill.count, "count = %lu, expected %lu\n", count, req->u.fill.count); break;
case REQ_SET_ACTIVE: output = req->u.handle; ret = SetConsoleActiveScreenBuffer(output); - ok(ret, "SetConsoleActiveScreenBuffer failed: %u\n", GetLastError()); + ok(ret, "SetConsoleActiveScreenBuffer failed: %lu\n", GetLastError()); break;
case REQ_SET_CURSOR: ret = SetConsoleCursorPosition(output, req->u.coord); - ok(ret, "SetConsoleCursorPosition failed: %u\n", GetLastError()); + ok(ret, "SetConsoleCursorPosition failed: %lu\n", GetLastError()); break;
case REQ_SET_INPUT_CP: ret = SetConsoleCP(req->u.cp); - ok(ret, "SetConsoleCP failed: %u\n", GetLastError()); + ok(ret, "SetConsoleCP failed: %lu\n", GetLastError()); break;
case REQ_SET_INPUT_MODE: ret = SetConsoleMode(input, req->u.mode); - ok(ret, "SetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "SetConsoleMode failed: %lu\n", GetLastError()); break;
case REQ_SET_OUTPUT_MODE: ret = SetConsoleMode(output, req->u.mode); - ok(ret, "SetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "SetConsoleMode failed: %lu\n", GetLastError()); break;
case REQ_SET_TITLE: ret = SetConsoleTitleW(req->u.string); - ok(ret, "SetConsoleTitleW failed: %u\n", GetLastError()); + ok(ret, "SetConsoleTitleW failed: %lu\n", GetLastError()); break;
case REQ_WRITE_CHARACTERS: ret = WriteConsoleOutputCharacterW(output, req->u.write_characters.buf, req->u.write_characters.len, req->u.write_characters.coord, &count); - ok(ret, "WriteConsoleOutputCharacterW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleOutputCharacterW failed: %lu\n", GetLastError()); break;
case REQ_WRITE_CONSOLE: ret = WriteConsoleW(output, req->u.string, lstrlenW(req->u.string), NULL, NULL); - ok(ret, "SetConsoleTitleW failed: %u\n", GetLastError()); + ok(ret, "SetConsoleTitleW failed: %lu\n", GetLastError()); break;
case REQ_WRITE_OUTPUT: { SMALL_RECT region = req->u.write_output.region; ret = WriteConsoleOutputW(output, req->u.write_output.buf, req->u.write_output.size, req->u.write_output.coord, ®ion); - ok(ret, "WriteConsoleOutput failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleOutput failed: %lu\n", GetLastError()); ret = WriteFile(pipe, ®ion, sizeof(region), &count, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); break; }
@@ -1547,7 +1547,7 @@ static void child_process(HANDLE pipe) ok(0, "unexpected request type %u\n", req->type); }; } - ok(GetLastError() == ERROR_BROKEN_PIPE, "ReadFile failed: %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "ReadFile failed: %lu\n", GetLastError()); CloseHandle(output); CloseHandle(input); } @@ -1570,7 +1570,7 @@ static HANDLE run_child(HANDLE console, HANDLE pipe) sprintf(cmdline, ""%s" %s child %p", argv[0], argv[1], pipe); ret = CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, &startup.StartupInfo, &info); - ok(ret, "CreateProcessW failed: %u\n", GetLastError()); + ok(ret, "CreateProcessW failed: %lu\n", GetLastError());
CloseHandle(info.hThread); HeapFree(GetProcessHeap(), 0, startup.lpAttributeList); @@ -1589,27 +1589,27 @@ static HPCON create_pseudo_console(HANDLE *console_pipe_end, HANDLE *child_proce
console_pipe = CreateNamedPipeW(L"\\.\pipe\pseudoconsoleconn", PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_WAIT | PIPE_TYPE_BYTE, 1, 4096, 4096, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(console_pipe != INVALID_HANDLE_VALUE, "CreateNamedPipeW failed: %u\n", GetLastError()); + ok(console_pipe != INVALID_HANDLE_VALUE, "CreateNamedPipeW failed: %lu\n", GetLastError());
*console_pipe_end = CreateFileW(L"\\.\pipe\pseudoconsoleconn", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - ok(*console_pipe_end != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(*console_pipe_end != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
child_pipe = CreateNamedPipeW(L"\\.\pipe\pseudoconsoleserver", PIPE_ACCESS_DUPLEX, PIPE_WAIT | PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, 1, 5000, 6000, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(child_pipe != INVALID_HANDLE_VALUE, "CreateNamedPipeW failed: %u\n", GetLastError()); + ok(child_pipe != INVALID_HANDLE_VALUE, "CreateNamedPipeW failed: %lu\n", GetLastError());
child_pipe_end = CreateFileW(L"\\.\pipe\pseudoconsoleserver", GENERIC_READ | GENERIC_WRITE, 0, &sec_attr, OPEN_EXISTING, 0, NULL); - ok(child_pipe_end != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(child_pipe_end != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
read_mode = PIPE_READMODE_MESSAGE; r = SetNamedPipeHandleState(child_pipe_end, &read_mode, NULL, NULL); - ok(r, "SetNamedPipeHandleState failed: %u\n", GetLastError()); + ok(r, "SetNamedPipeHandleState failed: %lu\n", GetLastError());
hres = pCreatePseudoConsole(size, *console_pipe_end, *console_pipe_end, 0, &console); - ok(hres == S_OK, "CreatePseudoConsole failed: %08x\n", hres); + ok(hres == S_OK, "CreatePseudoConsole failed: %08lx\n", hres);
*child_process = run_child(console, child_pipe_end); CloseHandle(child_pipe_end);
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/find/tests/Makefile.in | 1 - programs/find/tests/find.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/find/tests/Makefile.in b/programs/find/tests/Makefile.in index 5c4e5e39250..c5b359bd98f 100644 --- a/programs/find/tests/Makefile.in +++ b/programs/find/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = find.exe IMPORTS = user32
diff --git a/programs/find/tests/find.c b/programs/find/tests/find.c index b7c2d7b77c4..a85bda85bec 100644 --- a/programs/find/tests/find.c +++ b/programs/find/tests/find.c @@ -174,7 +174,7 @@ static void run_find_stdin_(const WCHAR *commandline, const BYTE *input, int inp
check_find_output(child_output, child_output_len, out_expected, out_expected_len, file, line);
- ok_(file, line)(exitcode == exitcode_expected, "Expected exitcode %d, got %d\n", exitcode_expected, exitcode); + ok_(file, line)(exitcode == exitcode_expected, "Expected exitcode %d, got %ld\n", exitcode_expected, exitcode);
heap_free(child_output); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/fsutil/tests/Makefile.in | 1 - programs/fsutil/tests/fsutil.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/programs/fsutil/tests/Makefile.in b/programs/fsutil/tests/Makefile.in index 01605e695f7..f0490b3b660 100644 --- a/programs/fsutil/tests/Makefile.in +++ b/programs/fsutil/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = fsutil.exe IMPORTS = advapi32 user32
diff --git a/programs/fsutil/tests/fsutil.c b/programs/fsutil/tests/fsutil.c index aa0d5d3884b..0e02d8cac65 100644 --- a/programs/fsutil/tests/fsutil.c +++ b/programs/fsutil/tests/fsutil.c @@ -97,7 +97,7 @@ static void test_hardlink(void) FILE_ATTRIBUTE_NORMAL, NULL); ok(hfile != INVALID_HANDLE_VALUE, "failed to open the hardlink\n"); boolrc = GetFileInformationByHandle(hfile, &info); - ok(boolrc, "failed to get info about hardlink, error %#x\n", GetLastError()); + ok(boolrc, "failed to get info about hardlink, error %#lx\n", GetLastError()); CloseHandle(hfile);
ok(info.nNumberOfLinks == 2, "our link is not a hardlink\n"); @@ -109,9 +109,9 @@ static void test_hardlink(void) ok(rc == 1, "fsutil didn't complain about nonexisting source file\n");
boolrc = DeleteFileA("link"); - ok(boolrc, "failed to delete the hardlink, error %#x\n", GetLastError()); + ok(boolrc, "failed to delete the hardlink, error %#lx\n", GetLastError()); boolrc = DeleteFileA("file"); - ok(boolrc, "failed to delete the file, error %#x\n", GetLastError()); + ok(boolrc, "failed to delete the file, error %#lx\n", GetLastError()); }
START_TEST(fsutil)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/regedit/tests/Makefile.in | 1 programs/regedit/tests/regedit.c | 80 ++++++++++++++++++------------------ 2 files changed, 40 insertions(+), 41 deletions(-)
diff --git a/programs/regedit/tests/Makefile.in b/programs/regedit/tests/Makefile.in index 215ca96006a..06bf31b402b 100644 --- a/programs/regedit/tests/Makefile.in +++ b/programs/regedit/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = regedit.exe IMPORTS = advapi32
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 7d2c9416bcc..bc0c9870464 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -56,12 +56,12 @@ static BOOL write_file(const void *str, DWORD size)
file = CreateFileA("test.reg", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError()); if (file == INVALID_HANDLE_VALUE) return FALSE;
ret = WriteFile(file, str, size, &written, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); CloseHandle(file);
return ret; @@ -96,7 +96,7 @@ static BOOL import_reg(unsigned line, const char *contents, BOOL unicode) run_regedit_exe("regedit.exe /s test.reg");
ret = DeleteFileA("test.reg"); - lok(ret, "DeleteFile failed: %u\n", GetLastError()); + lok(ret, "DeleteFile failed: %lu\n", GetLastError());
return ret; } @@ -118,14 +118,14 @@ static void verify_reg_(unsigned line, HKEY hkey, const char *value, size = sizeof(data); memset(data, 0xdd, size); err = RegQueryValueExA(hkey, value, NULL, &type, data, &size); - lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %d\n", err); + lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %ld\n", err); if (err != ERROR_SUCCESS) return;
todo_wine_if (todo & TODO_REG_TYPE) - lok(type == exp_type, "got wrong type %d, expected %d\n", type, exp_type); + lok(type == exp_type, "got wrong type %ld, expected %ld\n", type, exp_type); todo_wine_if (todo & TODO_REG_SIZE) - lok(size == exp_size, "got wrong size %d, expected %d\n", size, exp_size); + lok(size == exp_size, "got wrong size %ld, expected %ld\n", size, exp_size); if (exp_data) { todo_wine_if (todo & TODO_REG_DATA) @@ -139,7 +139,7 @@ static void r_verify_reg_nonexist(unsigned line, HKEY key, const char *value_nam LONG lr;
lr = RegQueryValueExA(key, value_name, NULL, NULL, NULL, NULL); - lok(lr == ERROR_FILE_NOT_FOUND, "registry value '%s' shouldn't exist; got %d, expected 2\n", + lok(lr == ERROR_FILE_NOT_FOUND, "registry value '%s' shouldn't exist; got %ld, expected 2\n", (value_name && *value_name) ? value_name : "(Default)", lr); }
@@ -149,7 +149,7 @@ static void open_key_(unsigned line, const HKEY base, const char *path, const DW LONG lr;
lr = RegOpenKeyExA(base, path, 0, KEY_READ|sam, hkey); - lok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: %d\n", lr); + lok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: %ld\n", lr); }
#define close_key(k) close_key_(__LINE__,k) @@ -158,7 +158,7 @@ static void close_key_(unsigned line, HKEY hkey) LONG lr;
lr = RegCloseKey(hkey); - lok(lr == ERROR_SUCCESS, "RegCloseKey failed: %d\n", lr); + lok(lr == ERROR_SUCCESS, "RegCloseKey failed: %ld\n", lr); }
#define verify_key(k,s) verify_key_(__LINE__,k,s) @@ -168,7 +168,7 @@ static void verify_key_(unsigned line, HKEY key_base, const char *subkey) LONG lr;
lr = RegOpenKeyExA(key_base, subkey, 0, KEY_READ, &hkey); - lok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: got %d\n", lr); + lok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: got %ld\n", lr);
if (hkey) RegCloseKey(hkey); @@ -181,7 +181,7 @@ static void verify_key_nonexist_(unsigned line, HKEY key_base, const char *subke LONG lr;
lr = RegOpenKeyExA(key_base, subkey, 0, KEY_READ, &hkey); - lok(lr == ERROR_FILE_NOT_FOUND, "registry key '%s' shouldn't exist; got %d, expected 2\n", + lok(lr == ERROR_FILE_NOT_FOUND, "registry key '%s' shouldn't exist; got %ld, expected 2\n", subkey, lr);
if (hkey) @@ -195,7 +195,7 @@ static void add_key_(unsigned line, const HKEY hkey, const char *path, HKEY *sub
lr = RegCreateKeyExA(hkey, path, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, NULL, subkey, NULL); - lok(lr == ERROR_SUCCESS, "RegCreateKeyExA failed: %d\n", lr); + lok(lr == ERROR_SUCCESS, "RegCreateKeyExA failed: %ld\n", lr); }
#define delete_key(k,p) delete_key_(__LINE__,k,p) @@ -206,7 +206,7 @@ static void delete_key_(unsigned line, const HKEY hkey, const char *path) LONG lr;
lr = RegDeleteKeyA(hkey, path); - lok(lr == ERROR_SUCCESS, "RegDeleteKeyA failed: %d\n", lr); + lok(lr == ERROR_SUCCESS, "RegDeleteKeyA failed: %ld\n", lr); } }
@@ -259,7 +259,7 @@ static void add_value_(unsigned line, HKEY hkey, const char *name, DWORD type, LONG lr;
lr = RegSetValueExA(hkey, name, 0, type, (const BYTE *)data, size); - lok(lr == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", lr); + lok(lr == ERROR_SUCCESS, "RegSetValueExA failed: %ld\n", lr); }
#define delete_value(k,n) delete_value_(__LINE__,k,n) @@ -268,7 +268,7 @@ static void delete_value_(unsigned line, const HKEY hkey, const char *name) LONG lr;
lr = RegDeleteValueA(hkey, name); - lok(lr == ERROR_SUCCESS, "RegDeleteValueA failed: %d\n", lr); + lok(lr == ERROR_SUCCESS, "RegDeleteValueA failed: %ld\n", lr); }
#define KEY_BASE "Software\Wine\regedit_test" @@ -450,17 +450,17 @@ static void test_basic_import(void) /* Wine11d */ size = sizeof(buffer); lr = RegQueryValueExA(hkey, "Wine11d", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %u, expected 6\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n"); /* Wine11e */ size = sizeof(buffer); memset(buffer, '-', size); lr = RegQueryValueExA(hkey, "Wine11e", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %u, expected 6\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n");
exec_import_str("REGEDIT4\n\n" @@ -596,17 +596,17 @@ static void test_basic_import(void) size = sizeof(buffer); memset(buffer, '-', size); lr = RegQueryValueExA(hkey, "Wine18d", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %u, expected 12\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n"); /* Wine18e */ size = sizeof(buffer); memset(buffer, '-', size); lr = RegQueryValueExA(hkey, "Wine18e", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %u, expected 12\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n");
exec_import_str("REGEDIT4\n\n" @@ -886,17 +886,17 @@ static void test_basic_import_unicode(void) /* Wine11d */ size = sizeof(buffer); lr = RegQueryValueExA(hkey, "Wine11d", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %u, expected 6\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n"); /* Wine11e */ size = sizeof(buffer); memset(buffer, '-', size); lr = RegQueryValueExA(hkey, "Wine11e", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %u, expected 6\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* Win2k */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n");
exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -1035,17 +1035,17 @@ static void test_basic_import_unicode(void) size = sizeof(buffer); memset(buffer, '-', size); lr = RegQueryValueExA(hkey, "Wine18d", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %u, expected 12\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n"); /* Wine18e */ size = sizeof(buffer); memset(buffer, '-', size); lr = RegQueryValueExA(hkey, "Wine18e", NULL, &type, (BYTE *)&buffer, &size); - ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", lr); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %u, expected 12\n", size); + ok(lr == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", lr); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* Win2k */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n");
exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -3450,7 +3450,7 @@ static BOOL compare_export_(unsigned line, const char *filename, const char *exp lok(!lstrcmpW(fbuf, wstr), "export data does not match expected data\n");
ret = DeleteFileA(filename); - lok(ret, "DeleteFile failed: %u\n", GetLastError()); + lok(ret, "DeleteFile failed: %lu\n", GetLastError());
exit: HeapFree(GetProcessHeap(), 0, fbuf);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/reg/tests/Makefile.in | 1 programs/reg/tests/add.c | 302 +++++++-------- programs/reg/tests/copy.c | 192 +++++---- programs/reg/tests/delete.c | 114 +++--- programs/reg/tests/export.c | 98 ++--- programs/reg/tests/import.c | 816 ++++++++++++++++++++-------------------- programs/reg/tests/query.c | 94 ++--- 7 files changed, 808 insertions(+), 809 deletions(-)
diff --git a/programs/reg/tests/Makefile.in b/programs/reg/tests/Makefile.in index 27edcfb7d7a..6d7530bb5d6 100644 --- a/programs/reg/tests/Makefile.in +++ b/programs/reg/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = reg.exe IMPORTS = advapi32
diff --git a/programs/reg/tests/add.c b/programs/reg/tests/add.c index 1be34602408..0d213414443 100644 --- a/programs/reg/tests/add.c +++ b/programs/reg/tests/add.c @@ -40,7 +40,7 @@ BOOL run_reg_exe_(const char *file, unsigned line, const char *cmd, DWORD *rc) TerminateProcess(pi.hProcess, 1);
bret = GetExitCodeProcess(pi.hProcess, rc); - lok(bret, "GetExitCodeProcess failed: %d\n", GetLastError()); + lok(bret, "GetExitCodeProcess failed: %ld\n", GetLastError());
CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -57,14 +57,14 @@ void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value, size = sizeof(data); memset(data, 0xdd, size); err = RegQueryValueExA(hkey, value, NULL, &type, data, &size); - lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got error %ld\n", err); if (err != ERROR_SUCCESS) return;
todo_wine_if (todo & TODO_REG_TYPE) - lok(type == exp_type, "got registry type %d, expected %d\n", type, exp_type); + lok(type == exp_type, "got registry type %ld, expected %ld\n", type, exp_type); todo_wine_if (todo & TODO_REG_SIZE) - lok(size == exp_size, "got data size %d, expected %d\n", size, exp_size); + lok(size == exp_size, "got data size %ld, expected %ld\n", size, exp_size); if (exp_data) { todo_wine_if (todo & TODO_REG_DATA) @@ -77,7 +77,7 @@ void verify_reg_nonexist_(const char *file, unsigned line, HKEY hkey, const char LONG err;
err = RegQueryValueExA(hkey, value, NULL, NULL, NULL, NULL); - lok(err == ERROR_FILE_NOT_FOUND, "registry value '%s' shouldn't exist; got %d, expected 2\n", + lok(err == ERROR_FILE_NOT_FOUND, "registry value '%s' shouldn't exist; got %ld, expected 2\n", (value && *value) ? value : "(Default)", err); }
@@ -86,7 +86,7 @@ void open_key_(const char *file, unsigned line, HKEY root, const char *path, REG LONG err;
err = RegOpenKeyExA(root, path, 0, KEY_READ|sam, hkey); - lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %ld\n", err); }
void close_key_(const char *file, unsigned line, HKEY hkey) @@ -94,7 +94,7 @@ void close_key_(const char *file, unsigned line, HKEY hkey) LONG err;
err = RegCloseKey(hkey); - lok(err == ERROR_SUCCESS, "RegCloseKey failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegCloseKey failed: got error %ld\n", err); }
void verify_key_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam) @@ -103,7 +103,7 @@ void verify_key_(const char *file, unsigned line, HKEY root, const char *path, R LONG err;
err = RegOpenKeyExA(root, path, 0, KEY_READ|sam, &hkey); - lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %ld\n", err);
if (hkey) RegCloseKey(hkey); @@ -115,7 +115,7 @@ void verify_key_nonexist_(const char *file, unsigned line, HKEY root, const char LONG err;
err = RegOpenKeyExA(root, path, 0, KEY_READ|sam, &hkey); - lok(err == ERROR_FILE_NOT_FOUND, "registry key '%s' shouldn't exist; got %d, expected 2\n", path, err); + lok(err == ERROR_FILE_NOT_FOUND, "registry key '%s' shouldn't exist; got %ld, expected 2\n", path, err);
if (hkey) RegCloseKey(hkey); @@ -128,7 +128,7 @@ void add_key_(const char *file, unsigned line, const HKEY root, const char *path
err = RegCreateKeyExA(root, path, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE|sam, NULL, &new_key, NULL); - lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: got error %ld\n", err);
if (hkey) *hkey = new_key; @@ -145,12 +145,12 @@ void delete_key_(const char *file, unsigned line, HKEY root, const char *path, R if (!sam) { err = RegDeleteKeyA(root, path); - lok(err == ERROR_SUCCESS, "RegDeleteKeyA failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegDeleteKeyA failed: got error %ld\n", err); } else { err = RegDeleteKeyExA(root, path, sam, 0); - lok(err == ERROR_SUCCESS, "RegDeleteKeyExA failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegDeleteKeyExA failed: got error %ld\n", err); } }
@@ -163,7 +163,7 @@ LONG delete_tree_(const char *file, unsigned line, HKEY root, const char *path, static const char empty[1];
ret = RegOpenKeyExA(root, path, 0, KEY_READ|sam, &hkey); - lok(!ret || ret == ERROR_FILE_NOT_FOUND, "RegOpenKeyExA failed, got error %d\n", ret); + lok(!ret || ret == ERROR_FILE_NOT_FOUND, "RegOpenKeyExA failed, got error %ld\n", ret); if (ret) return ret;
ret = RegQueryInfoKeyA(hkey, NULL, NULL, NULL, NULL, &max_subkey_len, @@ -195,7 +195,7 @@ LONG delete_tree_(const char *file, unsigned line, HKEY root, const char *path, ret = RegDeleteKeyExA(hkey, empty, sam, 0);
cleanup: - lok(!ret, "Failed to delete registry key, got error %d\n", ret); + lok(!ret, "Failed to delete registry key, got error %ld\n", ret); HeapFree(GetProcessHeap(), 0, subkey_name); RegCloseKey(hkey); return ret; @@ -207,7 +207,7 @@ void add_value_(const char *file, unsigned line, HKEY hkey, const char *name, LONG err;
err = RegSetValueExA(hkey, name, 0, type, (const BYTE *)data, size); - lok(err == ERROR_SUCCESS, "RegSetValueExA failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegSetValueExA failed: got error %ld\n", err); }
void delete_value_(const char *file, unsigned line, HKEY hkey, const char *name) @@ -215,7 +215,7 @@ void delete_value_(const char *file, unsigned line, HKEY hkey, const char *name) LONG err;
err = RegDeleteValueA(hkey, name); - lok(err == ERROR_SUCCESS, "RegDeleteValueA failed: got error %d\n", err); + lok(err == ERROR_SUCCESS, "RegDeleteValueA failed: got error %ld\n", err); }
/* Unit tests */ @@ -227,67 +227,67 @@ static void test_command_syntax(void) delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg add", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add /?", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg add /h", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg add -H", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
/* Duplicate switches */ run_reg_exe("reg add HKCU\" KEY_BASE " /v Wine /t REG_DWORD /d 0x1 /v Test /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dup1 /t REG_DWORD /d 123 /f /t REG_SZ", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dup2 /t REG_DWORD /d 123 /f /d 456", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /f /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v Wine /ve", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* No /v argument */ run_reg_exe("reg add HKCU\" KEY_BASE " /v", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /d Test /f /v", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* Test invalid switches */ run_reg_exe("reg add HKCU\" KEY_BASE " /v invalid1 /a", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v invalid2 /ae", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v invalid3 /", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v invalid4 -", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* Test empty type */ run_reg_exe("reg add HKCU\" KEY_BASE " /v emptyType /t "" /d WineTest /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* Test registry view */ run_reg_exe("reg add HKCU\" KEY_BASE " /v abc /d 123 /f /reg:32 /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v abc /d 123 /f /reg:32 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v abc /d 123 /f /reg:64 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); }
static void test_key_formats(void) @@ -299,30 +299,30 @@ static void test_key_formats(void) add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg add \HKCU\" KEY_BASE "\keytest0 /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r); verify_key_nonexist(hkey, "keytest0", 0);
run_reg_exe("reg add \\HKCU\" KEY_BASE "\keytest1 /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r); verify_key_nonexist(hkey, "keytest1", 0);
run_reg_exe("reg add HKCU\" KEY_BASE "\keytest2\\ /f", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), - "got exit code %u, expected 1\n", r); + "got exit code %lu, expected 1\n", r); err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE "\keytest2"); ok(err == ERROR_FILE_NOT_FOUND || broken(err == ERROR_SUCCESS /* WinXP */), - "got exit code %d, expected 2\n", err); + "got exit code %ld, expected 2\n", err);
run_reg_exe("reg add HKCU\" KEY_BASE "\keytest3\ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_key(hkey, "keytest3", 0);
run_reg_exe("reg add HKCU\" KEY_BASE "\keytest4 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_key(hkey, "keytest4", 0);
run_reg_exe("reg add HKCU\" KEY_BASE "\https://winehq.org /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "https://winehq.org", 0);
close_key(hkey); @@ -330,11 +330,11 @@ static void test_key_formats(void)
/* Test validity of trailing backslash after system key */ run_reg_exe("reg add HKCU\ /v Value1 /t REG_SZ /d foo /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); verify_reg_nonexist(HKEY_CURRENT_USER, "Value1");
run_reg_exe("reg add HKEY_CURRENT_USER\ /v Value2 /t REG_SZ /d bar /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); verify_reg_nonexist(HKEY_CURRENT_USER, "Value2"); }
@@ -344,7 +344,7 @@ static void test_add(void) DWORD r, dword;
run_reg_exe("reg add HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_CURRENT_USER, KEY_BASE, KEY_WRITE, &hkey);
@@ -354,13 +354,13 @@ static void test_add(void)
/* This also occurs when specifying a registry type and passing data */ run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_DWORD /d 0x5 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x5; verify_reg(hkey, NULL, REG_DWORD, &dword, sizeof(dword), 0);
/* The Default value can also be overwritten as an empty string */ run_reg_exe("reg add HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, NULL, REG_SZ, "", 1, 0);
close_key(hkey); @@ -368,7 +368,7 @@ static void test_add(void)
/* Specifying a value name doesn't initialize the Default value in a new key */ run_reg_exe("reg add HKCU\" KEY_BASE " /v Test /t REG_SZ /d "Just me here" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
@@ -384,7 +384,7 @@ static void test_add(void)
/* ... but we can add it without passing [/f] to reg.exe */ run_reg_exe("reg add HKCU\" KEY_BASE, &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, NULL, REG_SZ, "", 1, 0); delete_value(hkey, NULL);
@@ -395,7 +395,7 @@ static void test_add(void) add_value(hkey, "Test2", REG_DWORD, &dword, sizeof(dword));
run_reg_exe("reg add HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
verify_key(HKEY_CURRENT_USER, KEY_BASE, 0); verify_key(hkey, "Subkey", 0); @@ -404,7 +404,7 @@ static void test_add(void) verify_reg(hkey, NULL, REG_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_NONE /d Test /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
verify_key(HKEY_CURRENT_USER, KEY_BASE, 0); verify_key(hkey, "Subkey", 0); @@ -424,21 +424,21 @@ static void test_reg_none(void) add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_NONE /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, NULL, REG_NONE, "\0", 2, 0);
delete_value(hkey, NULL);
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /t REG_NONE /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_NONE, "\0", 2, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v none0 /d deadbeef /t REG_NONE /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "none0", REG_NONE, "d\0e\0a\0d\0b\0e\0e\0f\0\0", 18, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v none1 /t REG_NONE /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "none1", REG_NONE, "\0", 2, 0);
close_key(hkey); @@ -453,70 +453,70 @@ static void test_reg_sz(void) add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /d WineTest /f", &r); ok(r == REG_EXIT_SUCCESS || broken(r == REG_EXIT_FAILURE /* WinXP */), - "got exit code %d, expected 0\n", r); + "got exit code %ld, expected 0\n", r); if (r == REG_EXIT_SUCCESS) verify_reg(hkey, "", REG_SZ, "WineTest", 9, 0); else win_skip("broken reg.exe detected\n");
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /f /ve", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKEY_CURRENT_USER\" KEY_BASE " /ve /d WineTEST /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "WineTEST", 9, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /t REG_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v test0 /d deadbeef /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "test0", REG_SZ, "deadbeef", 9, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v test0 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "test0", REG_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v test1 /t REG_SZ /f /d", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_SZ /v test2 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "test2", REG_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_SZ /v test3 /f /d """, &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "test3", REG_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v string\04 /t REG_SZ /d "Value" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "string\04", REG_SZ, "Value", 6, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v string5 /t REG_SZ /d "foo\0bar" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "string5", REG_SZ, "foo\0bar", 9, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v \0 /t REG_SZ /d "Value" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "\0", REG_SZ, "Value", 6, 0);
/* Test support for forward and back slashes in value names */ run_reg_exe("reg add HKCU\" KEY_BASE " /v count/up /d one/two/three /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "count/up", REG_SZ, "one/two/three", 14, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v \foo\bar /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "\foo\bar", REG_SZ, "", 1, 0);
close_key(hkey); @@ -531,33 +531,33 @@ static void test_reg_expand_sz(void) add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_EXPAND_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_EXPAND_SZ, "", 1, 0);
delete_value(hkey, NULL);
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /t REG_EXPAND_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_EXPAND_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v expand0 /t REG_EXpand_sz /d "dead%PATH%beef" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "expand0", REG_EXPAND_SZ, "dead%PATH%beef", 15, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v expand1 /t REG_EXpand_sz /d "dead^%PATH^%beef" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "expand1", REG_EXPAND_SZ, "dead^%PATH^%beef", 17, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_EXPAND_SZ /v expand2 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "expand2", REG_EXPAND_SZ, "", 1, 0);
run_reg_exe("reg add HKEY_CURRENT_USER\" KEY_BASE " /ve /t REG_EXPAND_SZ /d WineTEST /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "", REG_EXPAND_SZ, "WineTEST", 9, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_EXPAND_SZ /v expand3 /f /d """, &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "expand3", REG_EXPAND_SZ, "", 1, 0);
close_key(hkey); @@ -574,35 +574,35 @@ static void test_reg_binary(void) add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_BINARY /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_BINARY, buffer, 0, 0);
delete_value(hkey, NULL);
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /t REG_BINARY /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_BINARY, buffer, 0, 0);
run_reg_exe("reg add HKEY_CURRENT_USER\" KEY_BASE " /ve /t REG_BINARY /d deadbeef /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); dword = 0xefbeadde; verify_reg(hkey, "", REG_BINARY, &dword, sizeof(DWORD), 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_BINARY /v bin0 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "bin0", REG_BINARY, buffer, 0, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_BINARY /v bin1 /f /d 0xDeAdBeEf", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_BINARY /v bin2 /f /d x01", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_BINARY /v bin3 /f /d 01x", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_BINARY /v bin4 /f /d DeAdBeEf0DD", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); /* Remaining nibble prefixed */ buffer[0] = 0x0d; buffer[1] = 0xea; buffer[2] = 0xdb; buffer[3] = 0xee; buffer[4] = 0xf0; buffer[5] = 0xdd; @@ -611,18 +611,18 @@ static void test_reg_binary(void) buffer[9] = 0xef; buffer[10] = 0x0d; buffer[11] = 0xd0; size = 6; err = RegQueryValueExA(hkey, "bin4", NULL, &type, (void *) (buffer+12), &size); - ok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %d\n", err); - ok(type == REG_BINARY, "got wrong type %u\n", type); - ok(size == 6, "got wrong size %u\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %ld\n", err); + ok(type == REG_BINARY, "got wrong type %lu\n", type); + ok(size == 6, "got wrong size %lu\n", size); ok(memcmp(buffer, buffer+12, 6) == 0 || broken(memcmp(buffer+6, buffer+12, 6) == 0 /* WinXP */), "got wrong data\n");
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_BINARY /v bin5 /d "" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "bin5", REG_BINARY, buffer, 0, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v bin6 /t REG_BINARY /f /d", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
close_key(hkey); delete_key(HKEY_CURRENT_USER, KEY_BASE, 0); @@ -638,7 +638,7 @@ static void test_reg_dword(void)
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_DWORD /f /d 12345678", &r); ok(r == REG_EXIT_SUCCESS || broken(r == REG_EXIT_FAILURE /* WinXP */), - "got exit code %d, expected 0\n", r); + "got exit code %ld, expected 0\n", r); dword = 12345678; if (r == REG_EXIT_SUCCESS) verify_reg(hkey, "", REG_DWORD, &dword, sizeof(dword), 0); @@ -646,84 +646,84 @@ static void test_reg_dword(void) win_skip("broken reg.exe detected\n");
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /t REG_DWORD /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword0 /t REG_DWORD /f /d", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword1 /t REG_DWORD /f", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword2 /t REG_DWORD /d zzz /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword3 /t REG_DWORD /d deadbeef /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword4 /t REG_DWORD /d 123xyz /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword5 /t reg_dword /d 12345678 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 12345678; verify_reg(hkey, "dword5", REG_DWORD, &dword, sizeof(dword), 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword6 /t REG_DWORD /D 0123 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); size = sizeof(dword); err = RegQueryValueExA(hkey, "dword6", NULL, &type, (LPBYTE)&dword, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %d\n", err); - ok(type == REG_DWORD, "got wrong type %d, expected %d\n", type, REG_DWORD); - ok(size == sizeof(DWORD), "got wrong size %d, expected %d\n", size, (int)sizeof(DWORD)); - ok(dword == 123 || broken(dword == 0123 /* WinXP */), "got wrong data %d, expected 123\n", dword); + ok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %ld\n", err); + ok(type == REG_DWORD, "got wrong type %ld, expected %d\n", type, REG_DWORD); + ok(size == sizeof(DWORD), "got wrong size %ld, expected %d\n", size, (int)sizeof(DWORD)); + ok(dword == 123 || broken(dword == 0123 /* WinXP */), "got wrong data %ld, expected 123\n", dword);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword7 /t reg_dword /d 0xabcdefg /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword8 /t REG_dword /d 0xdeadbeef /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0xdeadbeef; verify_reg(hkey, "dword8", REG_DWORD, &dword, sizeof(dword), 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_DWORD /v dword9 /f /d -1", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_DWORD /v dword10 /f /d -0x1", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword11 /t REG_dword /d 0x01ffffffff /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword12 /t REG_DWORD /d 0xffffffff /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = ~0u; verify_reg(hkey, "dword12", REG_DWORD, &dword, sizeof(dword), 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword13 /t REG_DWORD /d 00x123 /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword14 /t REG_DWORD /d 0X123 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x123; verify_reg(hkey, "dword14", REG_DWORD, &dword, sizeof(dword), 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword15 /t REG_DWORD /d 4294967296 /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword16 /t REG_DWORD /d 456 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 456; verify_reg(hkey, "dword16", REG_DWORD, &dword, sizeof(dword), 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v dword17 /t REG_DWORD /d 0x456 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x456; verify_reg(hkey, "dword17", REG_DWORD, &dword, sizeof(dword), 0);
/* REG_DWORD_LITTLE_ENDIAN */ run_reg_exe("reg add HKCU\" KEY_BASE " /v DWORD_LE /t REG_DWORD_LITTLE_ENDIAN /d 456 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 456; verify_reg(hkey, "DWORD_LE", REG_DWORD_LITTLE_ENDIAN, &dword, sizeof(dword), 0);
@@ -740,23 +740,23 @@ static void test_reg_dword_big_endian(void) DWORD r, dword;
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /t REG_DWORD_BIG_ENDIAN /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v Test1 /t REG_DWORD_BIG_ENDIAN /f /d", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v Test2 /t REG_DWORD_BIG_ENDIAN /f", &r); - ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %ld, expected 1\n", r);
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg add HKCU\" KEY_BASE " /v Test3 /t REG_DWORD_BIG_ENDIAN /d 456 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 456; verify_reg(hkey, "Test3", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v Test4 /t REG_DWORD_BIG_ENDIAN /d 0x456 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x456; verify_reg(hkey, "Test4", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), 0);
@@ -772,91 +772,91 @@ static void test_reg_multi_sz(void) add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_MULTI_SZ, "", 1, 0);
delete_value(hkey, NULL);
run_reg_exe("reg add HKCU\" KEY_BASE " /ve /t REG_MULTI_SZ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, NULL, REG_MULTI_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi0 /t REG_MULTI_SZ /d "three\0little\0strings" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi0", REG_MULTI_SZ, "three\0little\0strings\0", 22, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi1 /s "#" /d "three#little#strings" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi1", REG_MULTI_SZ, "three\0little\0strings\0", 22, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi2 /d "" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi2", REG_MULTI_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi3 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi3", REG_MULTI_SZ, "", 1, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s "#" /d "threelittlestrings" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi4", REG_MULTI_SZ, "threelittlestrings\0", 20, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi5 /s "#randomgibberish" /d "three#little#strings" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi6 /s "\0" /d "three\0little\0strings" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi7 /s "" /d "three#little#strings" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi8 /s "#" /d "##" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi9 /s "#" /d "two##strings" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi10 /s "#" /d "#a" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi11 /s "#" /d "a#" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi11", REG_MULTI_SZ, "a\0", 3, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi12 /t REG_MULTI_SZ /f /d", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi13 /t REG_MULTI_SZ /f /s", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi14 /t REG_MULTI_SZ /d "\0a" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi15 /t REG_MULTI_SZ /d "a\0" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi15", REG_MULTI_SZ, "a\0", 3, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi16 /d "two\0\0strings" /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %lu, expected 1\n", r);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi17 /t REG_MULTI_SZ /s "#" /d "#" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi17", REG_MULTI_SZ, "\0", 2, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi18 /t REG_MULTI_SZ /d "\0" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi18", REG_MULTI_SZ, "\0", 2, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi19 /t REG_MULTI_SZ /s "#" /d "two\0#strings" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi19", REG_MULTI_SZ, "two\0\0strings\0", 15, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi20 /t REG_MULTI_SZ /s "#" /d "two#\0strings" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi20", REG_MULTI_SZ, "two\0\0strings\0", 15, 0);
run_reg_exe("reg add HKCU\" KEY_BASE " /v multi21 /t REG_MULTI_SZ /s "#" /d "two\0\0strings" /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %lu, expected 0\n", r); verify_reg(hkey, "multi21", REG_MULTI_SZ, "two\0\0strings\0", 16, 0);
close_key(hkey); @@ -876,7 +876,7 @@ static void test_registry_view_win32(void)
/* Try adding to the 32-bit registry view (32-bit Windows) */ run_reg_exe("reg add HKLM\" KEY_BASE " /v Wine32 /d Test /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey); verify_reg(hkey, "Wine32", REG_SZ, "Test", 5, 0); @@ -890,7 +890,7 @@ static void test_registry_view_win32(void)
/* Try adding to the 64-bit registry view, which doesn't exist on 32-bit Windows */ run_reg_exe("reg add HKLM\" KEY_BASE " /v Wine64 /d Test /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey); verify_reg(hkey, "Wine64", REG_SZ, "Test", 5, 0); @@ -916,7 +916,7 @@ static void test_registry_view_win64(void)
/* Try adding to the 32-bit registry view (64-bit Windows) */ run_reg_exe("reg add HKLM\" KEY_BASE " /v Wine32 /d Test /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey); verify_reg(hkey, "Wine32", REG_SZ, "Test", 5, 0); @@ -927,7 +927,7 @@ static void test_registry_view_win64(void)
/* Try adding to the 64-bit registry view (64-bit Windows) */ run_reg_exe("reg add HKLM\" KEY_BASE " /v Wine64 /d Test /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey); verify_reg(hkey, "Wine64", REG_SZ, "Test", 5, 0); @@ -949,7 +949,7 @@ static void test_registry_view_wow64(void)
/* Try adding to the 32-bit registry view (WOW64) */ run_reg_exe("reg add HKLM\" KEY_BASE " /v Wine32 /d Test /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey); verify_reg(hkey, "Wine32", REG_SZ, "Test", 5, 0); @@ -960,7 +960,7 @@ static void test_registry_view_wow64(void)
/* Try adding to the 64-bit registry view (WOW64) */ run_reg_exe("reg add HKLM\" KEY_BASE " /v Wine64 /d Test /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey); verify_reg(hkey, "Wine64", REG_SZ, "Test", 5, 0); diff --git a/programs/reg/tests/copy.c b/programs/reg/tests/copy.c index bc07c3cafb9..25da2d8eb7c 100644 --- a/programs/reg/tests/copy.c +++ b/programs/reg/tests/copy.c @@ -25,101 +25,101 @@ static void test_command_syntax(void) DWORD r;
run_reg_exe("reg copy", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /?", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg copy /h", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg copy -H", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg copy /? /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /h /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /? /s", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /h /s", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /s", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /s /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /f /s", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " foo /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy /f HKCU\" COPY_SRC " HKCU\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " /f HKCU\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " /s HKCU\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /a", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f /a", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* Source and destination keys are the same */ run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" COPY_SRC, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" COPY_SRC, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" COPY_SRC "\", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" COPY_SRC "\", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" COPY_SRC " /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" COPY_SRC " /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" COPY_SRC "\ /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" COPY_SRC "\ /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" COPY_SRC " /s /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" COPY_SRC " /s /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" COPY_SRC "\ /s /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" COPY_SRC "\ /s /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); }
static void test_copy_empty_key(void) @@ -133,53 +133,53 @@ static void test_copy_empty_key(void)
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE "\ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" KEY_BASE "\ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n");
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /s /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n"); }
@@ -200,53 +200,53 @@ static void test_copy_simple_data(void)
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", simple_data_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", simple_data_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE "\ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", simple_data_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg copy HKCU\" COPY_SRC "\ HKCU\" KEY_BASE "\ /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", simple_data_test, 0), "compare_export() failed\n");
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /s /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", simple_data_test, 0), "compare_export() failed\n"); }
@@ -299,20 +299,20 @@ static void test_copy_complex_data(void)
/* Copy values only */ run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", simple_data_test, 0), "compare_export() failed\n");
/* Copy subkeys and values */ run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /s /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", complex_data_test, 0), "compare_export() failed\n"); }
@@ -330,11 +330,11 @@ static void test_copy_key_order(void) close_key(hkey);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /s /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", key_order_test, 0), "compare_export() failed\n"); }
@@ -352,11 +352,11 @@ static void test_copy_value_order(void) close_key(hkey);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", value_order_test, TODO_REG_COMPARE), "compare_export() failed\n"); }
@@ -381,11 +381,11 @@ static void test_copy_hex_data(void) close_key(hkey);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_hex_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, COPY_SRC, 0); @@ -397,14 +397,14 @@ static void test_copy_hex_data(void) ""Wine2a"=hex(1):\n" ""Wine2b"=hex(3):\n" ""Wine2c"=hex(4):\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_hex_test2, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, COPY_SRC, 0); @@ -416,14 +416,14 @@ static void test_copy_hex_data(void) ""Wine3a"=hex(1):56,00,61,00,6c,00,75,00,65,00,00,00\n" ""Wine3b"=hex(3):12,34,56,78\n" ""Wine3c"=hex(4):40,30,20,10\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", hex_types_test, 0), "compare_export() failed\n"); }
@@ -445,14 +445,14 @@ static void test_copy_embedded_null_values(void) ""Wine4g"="Value2"\n" ""Wine4h"=hex(1):61,00,62,00,63,00,00,00, \\n" " 64,00,65,00,66,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", embedded_null_test, 0), "compare_export() failed\n"); }
@@ -471,11 +471,11 @@ static void test_copy_slashes(void) close_key(hkey);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /s /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", slashes_test, TODO_REG_COMPARE), "compare_export() failed\n"); }
@@ -497,11 +497,11 @@ static void test_copy_escaped_null_values(void) close_key(hkey);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export HKCU\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", escaped_null_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, COPY_SRC, 0); @@ -518,20 +518,20 @@ static void test_copy_key_class(void)
rc = RegCreateKeyExA(HKEY_CURRENT_USER, COPY_SRC, 0, class, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, NULL, &hkey, NULL); - ok(rc == ERROR_SUCCESS, "RegCreateKeyExA failed: got %d, expected 0\n", rc); + ok(rc == ERROR_SUCCESS, "RegCreateKeyExA failed: got %ld, expected 0\n", rc);
add_value(hkey, "String", REG_SZ, "Data", 5);
buf_size = sizeof(buf);
rc = RegQueryInfoKeyA(hkey, buf, &buf_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(rc == ERROR_SUCCESS, "RegQueryInfoKeyA failed: got %d, expected 0\n", rc); + ok(rc == ERROR_SUCCESS, "RegQueryInfoKeyA failed: got %ld, expected 0\n", rc); ok(!strcmp(buf, "class"), "Incorrect key class set; got '%s', expected '%s'\n", buf, class);
RegCloseKey(hkey);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(HKEY_CURRENT_USER, KEY_BASE, 0);
open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); @@ -541,7 +541,7 @@ static void test_copy_key_class(void) buf_size = sizeof(buf);
rc = RegQueryInfoKeyA(hkey, buf, &buf_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(rc == ERROR_SUCCESS, "RegQueryInfoKeyA failed: got %d, expected 0\n", rc); + ok(rc == ERROR_SUCCESS, "RegQueryInfoKeyA failed: got %ld, expected 0\n", rc); ok(strlen(buf) == 0, "Key class should not exist\n");
RegCloseKey(hkey); @@ -573,7 +573,7 @@ static void test_copy_overwrite(void) close_key(hkey);
run_reg_exe("reg copy HKCU\" COPY_SRC " HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); verify_reg(hkey, "Wine1", REG_SZ, "def", 4, 0); @@ -622,10 +622,10 @@ static void test_registry_view_win32(void) create_test_key(KEY_WOW64_32KEY);
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export HKLM\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
delete_tree(HKEY_LOCAL_MACHINE, COPY_SRC, KEY_WOW64_32KEY); @@ -635,10 +635,10 @@ static void test_registry_view_win32(void) create_test_key(KEY_WOW64_64KEY);
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export HKLM\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
delete_tree(HKEY_LOCAL_MACHINE, COPY_SRC, KEY_WOW64_64KEY); @@ -666,14 +666,14 @@ static void test_registry_view_win64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export HKLM\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, COPY_SRC, KEY_WOW64_32KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); @@ -684,14 +684,14 @@ static void test_registry_view_win64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export HKLM\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, COPY_SRC, KEY_WOW64_64KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); @@ -717,14 +717,14 @@ static void test_registry_view_wow64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export HKLM\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, COPY_SRC, KEY_WOW64_32KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); @@ -735,14 +735,14 @@ static void test_registry_view_wow64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export HKLM\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg copy HKLM\" COPY_SRC " HKLM\" KEY_BASE " /s /f /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, COPY_SRC, KEY_WOW64_64KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); diff --git a/programs/reg/tests/delete.c b/programs/reg/tests/delete.c index 2bc1abadfcb..7650084401d 100644 --- a/programs/reg/tests/delete.c +++ b/programs/reg/tests/delete.c @@ -26,55 +26,55 @@ static void test_command_syntax(void) delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg delete", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete /?", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg delete /h", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg delete -H", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
/* Multiple /v* switches */ run_reg_exe("reg delete HKCU\" KEY_BASE " /v Wine /ve", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /v Wine /va", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /ve /ve", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /ve /va", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /va /va", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /v Test /ve /va", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /v Wine /v Test /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* No /v argument */ run_reg_exe("reg delete HKCU\" KEY_BASE " /v", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /f /v", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* Test registry view */ run_reg_exe("reg delete HKCU\" KEY_BASE " /f /reg:32 /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /f /reg:32 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg delete HKCU\" KEY_BASE " /f /reg:64 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); }
static void test_delete(void) @@ -94,15 +94,15 @@ static void test_delete(void) add_key(hkey, "subkey", 0, NULL);
run_reg_exe("reg delete HKCU\" KEY_BASE " /v bar /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "bar");
run_reg_exe("reg delete HKCU\" KEY_BASE " /ve /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
run_reg_exe("reg delete HKCU\" KEY_BASE " /va /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "foo"); verify_key(hkey, "subkey", 0);
@@ -112,15 +112,15 @@ static void test_delete(void) add_value(hkey, "\foo\bar", REG_SZ, "", 1);
run_reg_exe("reg delete HKCU\" KEY_BASE "\https://winehq.org /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "https://winehq.org", 0);
run_reg_exe("reg delete HKCU\" KEY_BASE " /v count/up /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "count/up");
run_reg_exe("reg delete HKCU\" KEY_BASE " /v \foo\bar /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "\foo\bar");
add_value(hkey, "string\01", REG_SZ, "Value", 6); @@ -128,25 +128,25 @@ static void test_delete(void) add_value(hkey, "\0", REG_SZ, "Value", 6);
run_reg_exe("reg delete HKCU\" KEY_BASE " /v string\01 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "string\01");
run_reg_exe("reg delete HKCU\" KEY_BASE " /v string2 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "string2");
run_reg_exe("reg delete HKCU\" KEY_BASE " /v \0 /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "\0");
close_key(hkey);
run_reg_exe("reg delete HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg delete HKCU\" KEY_BASE " /f", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); }
static void create_test_key(REGSAM sam) @@ -189,27 +189,27 @@ static void test_registry_view_win32(void) open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /v DWORD /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "DWORD");
run_reg_exe("reg delete HKLM\" KEY_BASE " /ve /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, NULL);
run_reg_exe("reg delete HKLM\" KEY_BASE " /va /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "String"); verify_reg_nonexist(hkey, "Multiple Strings"); verify_key(hkey, "Subkey", KEY_WOW64_32KEY);
run_reg_exe("reg delete HKLM\" KEY_BASE "\Subkey /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey", KEY_WOW64_32KEY);
close_key(hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
/* Test deletion from the 64-bit registry view, which doesn't exist on 32-bit Windows */ @@ -218,27 +218,27 @@ static void test_registry_view_win32(void) open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /v DWORD /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "DWORD");
run_reg_exe("reg delete HKLM\" KEY_BASE " /ve /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, NULL);
run_reg_exe("reg delete HKLM\" KEY_BASE " /va /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "String"); verify_reg_nonexist(hkey, "Multiple Strings"); verify_key(hkey, "Subkey", KEY_WOW64_64KEY);
run_reg_exe("reg delete HKLM\" KEY_BASE "\Subkey /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey", KEY_WOW64_64KEY);
close_key(hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); }
@@ -264,27 +264,27 @@ static void test_registry_view_win64(void) open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /v DWORD /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "DWORD");
run_reg_exe("reg delete HKLM\" KEY_BASE " /ve /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, NULL);
run_reg_exe("reg delete HKLM\" KEY_BASE " /va /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "String"); verify_reg_nonexist(hkey, "Multiple Strings"); verify_key(hkey, "Subkey", KEY_WOW64_32KEY);
run_reg_exe("reg delete HKLM\" KEY_BASE "\Subkey /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey", KEY_WOW64_32KEY);
close_key(hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
/* Test deletion from the 64-bit registry view (64-bit Windows) */ @@ -295,27 +295,27 @@ static void test_registry_view_win64(void) open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /v DWORD /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "DWORD");
run_reg_exe("reg delete HKLM\" KEY_BASE " /ve /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, NULL);
run_reg_exe("reg delete HKLM\" KEY_BASE " /va /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "String"); verify_reg_nonexist(hkey, "Multiple Strings"); verify_key(hkey, "Subkey", KEY_WOW64_64KEY);
run_reg_exe("reg delete HKLM\" KEY_BASE "\Subkey /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey", KEY_WOW64_64KEY);
close_key(hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); }
@@ -340,27 +340,27 @@ static void test_registry_view_wow64(void) open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /v DWORD /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "DWORD");
run_reg_exe("reg delete HKLM\" KEY_BASE " /ve /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, NULL);
run_reg_exe("reg delete HKLM\" KEY_BASE " /va /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "String"); verify_reg_nonexist(hkey, "Multiple Strings"); verify_key(hkey, "Subkey", KEY_WOW64_32KEY);
run_reg_exe("reg delete HKLM\" KEY_BASE "\Subkey /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey", KEY_WOW64_32KEY);
close_key(hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /f /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
/* Test deletion from the 64-bit registry view (WOW64) */ @@ -371,27 +371,27 @@ static void test_registry_view_wow64(void) open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /v DWORD /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "DWORD");
run_reg_exe("reg delete HKLM\" KEY_BASE " /ve /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, NULL);
run_reg_exe("reg delete HKLM\" KEY_BASE " /va /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "String"); verify_reg_nonexist(hkey, "Multiple Strings"); verify_key(hkey, "Subkey", KEY_WOW64_64KEY);
run_reg_exe("reg delete HKLM\" KEY_BASE "\Subkey /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey", KEY_WOW64_64KEY);
close_key(hkey);
run_reg_exe("reg delete HKLM\" KEY_BASE " /f /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); }
diff --git a/programs/reg/tests/export.c b/programs/reg/tests/export.c index 3061783ca06..7d75ea016b7 100644 --- a/programs/reg/tests/export.c +++ b/programs/reg/tests/export.c @@ -184,53 +184,53 @@ static void test_command_syntax(void) delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
run_reg_exe("reg export", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export /?", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export /h", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export -H", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg export \\remote-pc\HKLM\Wine file.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_DYN_DATA file.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKDD file.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export file.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export file.reg HKEY_CURRENT_USER\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* This test fails because the registry key doesn't exist */ run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg file2.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /reg:32 /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /reg:32 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /reg:64 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); }
static void test_export(void) @@ -246,18 +246,18 @@ static void test_export(void) add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n");
run_reg_exe("reg export /y HKEY_CURRENT_USER\" KEY_BASE " file.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " /y file.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); ok(r == REG_EXIT_SUCCESS || broken(r == REG_EXIT_FAILURE), /* winxp */ - "got exit code %d, expected 0\n", r); + "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_key_test, 0), "compare_export() failed\n");
/* Test registry export with a simple data structure */ @@ -266,12 +266,12 @@ static void test_export(void) add_value(hkey, "String", REG_SZ, "Your text here...", 18);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", simple_data_test, 0), "compare_export() failed\n");
/* Test whether a .reg file extension is required when exporting */ run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " foo /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("foo", simple_data_test, 0), "compare_export() failed\n");
/* Test registry export with a complex data structure */ @@ -309,7 +309,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", complex_data_test, 0), "compare_export() failed\n"); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -319,7 +319,7 @@ static void test_export(void) add_key(hkey, "Subkey1", 0, NULL);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", key_order_test, 0), "compare_export() failed\n"); delete_key(hkey, "Subkey1", 0); delete_key(hkey, "Subkey2", 0); @@ -332,7 +332,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", value_order_test, TODO_REG_COMPARE), "compare_export() failed\n"); delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -349,7 +349,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_hex_test, 0), "compare_export() failed\n"); delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -359,7 +359,7 @@ static void test_export(void) ""Wine2a"=hex(1):\n" ""Wine2b"=hex(3):\n" ""Wine2c"=hex(4):\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); verify_reg(hkey, "Wine2a", REG_SZ, NULL, 0, 0); verify_reg(hkey, "Wine2b", REG_BINARY, NULL, 0, 0); @@ -367,7 +367,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", empty_hex_test2, 0), "compare_export() failed\n"); delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -376,7 +376,7 @@ static void test_export(void) ""Wine3a"=hex(1):56,00,61,00,6c,00,75,00,65,00,00,00\n" ""Wine3b"=hex(3):12,34,56,78\n" ""Wine3c"=hex(4):40,30,20,10\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); verify_reg(hkey, "Wine3a", REG_SZ, "Value", 6, 0); memcpy(hex, "\x12\x34\x56\x78", 4); @@ -386,7 +386,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", hex_types_test, 0), "compare_export() failed\n"); delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -402,7 +402,7 @@ static void test_export(void) ""Wine4g"="Value2"\n" ""Wine4h"=hex(1):61,00,62,00,63,00,00,00, \\n" " 64,00,65,00,66,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); dword = 0x5; verify_reg(hkey, "Wine4a", REG_DWORD, &dword, sizeof(dword), 0); @@ -411,9 +411,9 @@ static void test_export(void) /* Wine4d */ size = sizeof(buffer); err = RegQueryValueExA(hkey, "Wine4d", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_SZ, "got wrong type %u, expected %u\n", type, REG_SZ); - ok(size == 5 || broken(size == 4) /* WinXP */, "got wrong size %u, expected 5\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_SZ, "got wrong type %lu, expected %u\n", type, REG_SZ); + ok(size == 5 || broken(size == 4) /* WinXP */, "got wrong size %lu, expected 5\n", size); ok(memcmp(buffer, "\0abc", size) == 0, "got wrong data\n"); dword = 0x100; verify_reg(hkey, "Wine4e", REG_DWORD, &dword, sizeof(dword), 0); @@ -423,7 +423,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", embedded_null_test, 0), "compare_export() failed\n"); delete_key(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -435,7 +435,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", slashes_test, TODO_REG_COMPARE), "compare_export() failed\n"); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -450,7 +450,7 @@ static void test_export(void) close_key(hkey);
run_reg_exe("reg export HKEY_CURRENT_USER\" KEY_BASE " file.reg /y", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", escaped_null_test, 0), "compare_export() failed\n"); delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); } @@ -488,11 +488,11 @@ static void test_registry_view_win32(void) create_test_key(KEY_WOW64_32KEY);
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); @@ -501,11 +501,11 @@ static void test_registry_view_win32(void) create_test_key(KEY_WOW64_64KEY);
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); @@ -528,11 +528,11 @@ static void test_registry_view_win64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); @@ -542,11 +542,11 @@ static void test_registry_view_win64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); } @@ -567,11 +567,11 @@ static void test_registry_view_wow64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); @@ -581,11 +581,11 @@ static void test_registry_view_wow64(void) verify_key_nonexist(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); ok(compare_export("file.reg", registry_view_test, 0), "compare_export() failed\n");
run_reg_exe("reg export HKEY_LOCAL_MACHINE\" KEY_BASE " file.reg /y /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); } diff --git a/programs/reg/tests/import.c b/programs/reg/tests/import.c index ffc29d5cf1b..882a52fa00f 100644 --- a/programs/reg/tests/import.c +++ b/programs/reg/tests/import.c @@ -46,7 +46,7 @@ BOOL delete_file_(const char *file, unsigned line, const char *fname) BOOL ret;
ret = DeleteFileA(fname); - lok(ret, "DeleteFile failed: %u\n", GetLastError()); + lok(ret, "DeleteFile failed: %lu\n", GetLastError());
return ret; } @@ -58,12 +58,12 @@ static BOOL write_file(const char *fname, const void *str, DWORD size) DWORD written;
file = CreateFileA(fname, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError()); if (file == INVALID_HANDLE_VALUE) return FALSE;
ret = WriteFile(file, str, size, &written, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); CloseHandle(file);
return ret; @@ -114,31 +114,31 @@ static void test_command_syntax(void) DWORD r;
run_reg_exe("reg import", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg import /?", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import /h", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import -H", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import missing.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg import a.reg b.reg", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg import foo.reg /reg:32 /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg import foo.reg /reg:32 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg import foo.reg /reg:64 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); }
static void test_import(void) @@ -154,191 +154,191 @@ static void test_import(void) /* Test file contents */ test_import_str("regedit\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_str("regedit4\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_str("REGEDIT", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("REGEDIT\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("REGEDIT4\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str(" REGEDIT4\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("\tREGEDIT4\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("\nREGEDIT4\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_str("AREGEDIT4\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_str("1REGEDIT4\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_str("REGEDIT3\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("REGEDIT5\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("REGEDIT9\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("REGEDIT 4\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("REGEDIT4 FOO\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("REGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_CURRENT_USER, KEY_BASE, KEY_SET_VALUE, &hkey);
test_import_str("REGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine"=dword:00000123\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine", REG_DWORD, &dword, sizeof(dword), 0);
test_import_str("REGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "@="Test string"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, NULL, REG_SZ, "Test string", 12, 0);
test_import_str("REGEDIT3\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test1"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test1");
test_import_str("regedit4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test2"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test2");
test_import_str("Regedit4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test3"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test3");
test_import_str("REGEDIT 4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test4"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test4");
test_import_str("REGEDIT4FOO\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test5"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test5");
test_import_str("REGEDIT4 FOO\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test6"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test6");
test_import_str("REGEDIT5\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test7"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test7");
test_import_str("REGEDIT9\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test8"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test8");
test_import_str("Windows Registry Editor Version 4.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test9"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test9");
test_import_str("Windows Registry Editor Version 5\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test10"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test10");
test_import_str("WINDOWS REGISTRY EDITOR VERSION 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test11"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test11");
test_import_str("Windows Registry Editor version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test12"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test12");
test_import_str("REGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test1"="Value1"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Test1", REG_SZ, "Value1", 7, 0);
test_import_str("REGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test2"="Value2"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Test2", REG_SZ, "Value2", 7, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test3"="Value3"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Test3", REG_SZ, "Value3", 7, 0);
test_import_str("Windows Registry Editor Version 4.00\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_str("Windows Registry Editor Version 5.00\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_str("Windows Registry Editor Version 5.00\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test4"="Value4"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Test4", REG_SZ, "Value4", 7, 0);
test_import_str("Windows Registry Editor Version 5.00\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test5"="Value5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Test5", REG_SZ, "Value5", 7, 0);
test_import_str("Windows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test6"="Value6"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Test6", REG_SZ, "Value6", 7, 0);
test_import_str("REGEDIT4\n\n" @@ -347,7 +347,7 @@ static void test_import(void) ""Line2"="Value2"\n\n\n" ""Line3"="Value3"\n\n\n\n" ""Line4"="Value4"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Line1", REG_SZ, "Value1", 7, 0); verify_reg(hkey, "Line2", REG_SZ, "Value2", 7, 0); verify_reg(hkey, "Line3", REG_SZ, "Value3", 7, 0); @@ -363,7 +363,7 @@ static void test_import(void) "@="Test"\n" ";comment\n\n" ""Wine4"=dword:12345678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x782; verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine2", REG_SZ, "Test Value", 11, 0); @@ -375,10 +375,10 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine5"="No newline"", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine5", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND /* WinXP */), - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine5", REG_SZ, "No newline", 11, 0);
@@ -386,12 +386,12 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine6"=dword:00000050\n\n" ""Wine7"="No newline"", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x50; verify_reg(hkey, "Wine6", REG_DWORD, &dword, sizeof(dword), 0); err = RegQueryValueExA(hkey, "Wine7", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND /* WinXP */), - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine7", REG_SZ, "No newline", 11, 0);
@@ -401,7 +401,7 @@ static void test_import(void) ""Wine8"="Line 1"\n" ";comment\\n" ""Wine9"="Line 2"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine8", REG_SZ, "Line 1", 7, 0); verify_reg(hkey, "Wine9", REG_SZ, "Line 2", 7, 0);
@@ -411,7 +411,7 @@ static void test_import(void) ""Wine11"="Value 2";comment\n" ""Wine12"=dword:01020304 #comment\n" ""Wine13"=dword:02040608 ;comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine10"); verify_reg(hkey, "Wine11", REG_SZ, "Value 2", 8, 0); verify_reg_nonexist(hkey, "Wine12"); @@ -428,7 +428,7 @@ static void test_import(void) " ;comment\n" " 63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n" ""Wine17"="Another valid line"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine14"); verify_reg(hkey, "Wine15", REG_SZ, "A valid line", 13, 0); verify_reg(hkey, "Wine16", REG_MULTI_SZ, "Line concatenation\0", 20, 0); @@ -442,7 +442,7 @@ static void test_import(void) " ;"Comment4"="Value 4"\n" ""Wine18"="Value 6"#"Comment5"="Value 5"\n" ""Wine19"="Value 7";"Comment6"="Value 6"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Comment1"); verify_reg_nonexist(hkey, "Comment2"); verify_reg_nonexist(hkey, "Comment3"); @@ -466,7 +466,7 @@ static void test_import(void) ""Wine29"=;dword:00000002\n" ""Wine30"=dword:00000003#comment\n" ""Wine31"=dword:00000004;comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine20"); verify_reg_nonexist(hkey, "Wine21"); verify_reg(hkey, "Wine22", REG_SZ, "#comment1", 10, 0); @@ -487,7 +487,7 @@ static void test_import(void) " 63,6f,6e,\;comment\n" " 63,61,74,\;comment\n" " 65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line1", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" @@ -496,35 +496,35 @@ static void test_import(void) " 63,6f,6e,\;comment\n" " 63,61,74,;comment\n" " 65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line2", REG_MULTI_SZ, "Line concat", 12, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line3"=hex(7):4c,69,6e,65,20\\n" ",63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line3");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line4"=hex(7):4c,69,6e,65,20\\n" " ,63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line4");
test_import_str("Windows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line5"=hex(7):4c,69,6e,65,20\\n" ",63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line5");
test_import_str("Windows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line6"=hex(7):4c,69,6e,65,20\\n" " ,63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line6");
test_import_str("REGEDIT4\n\n" @@ -534,7 +534,7 @@ static void test_import(void) " 63,6f,6e,\;comment\n" " 63,61,74,\;comment\n" " 65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line7", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" @@ -544,7 +544,7 @@ static void test_import(void) " 63,6f,6e,\;#comment\n" " 63,61,74,\;#comment\n" " 65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line8", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" @@ -554,7 +554,7 @@ static void test_import(void) " 63,6f,6e,\;comment\n" " 63,61,74,\#comment\n" " 65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line9");
test_import_str("REGEDIT4\n\n" @@ -564,14 +564,14 @@ static void test_import(void) " 63,61,74,\\n\n" " 65,6e,\;comment\n\n" " 61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line10", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine32a"=dword:1\n" ""Wine32b"=dword:4444\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x1; verify_reg(hkey, "Wine32a", REG_DWORD, &dword, sizeof(dword), 0); dword = 0x4444; @@ -584,7 +584,7 @@ static void test_import(void) ""Wine33c"=dword:123456789\n" ""Wine33d"=dword:012345678\n" ""Wine33e"=dword:000000001\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine33a"); verify_reg_nonexist(hkey, "Wine33b"); verify_reg_nonexist(hkey, "Wine33c"); @@ -595,7 +595,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine34a"=dword:12345678abc\n" ""Wine34b"=dword:12345678 abc\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine34a"); verify_reg_nonexist(hkey, "Wine34b");
@@ -604,7 +604,7 @@ static void test_import(void) ""Wine35a"=dword:0x123\n" ""Wine35b"=dword:123 456\n" ""Wine35c"=dword:1234 5678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine35a"); verify_reg_nonexist(hkey, "Wine35b"); verify_reg_nonexist(hkey, "Wine35c"); @@ -615,7 +615,7 @@ static void test_import(void) ""Wine36b"=dword:1234 ;5678\n" ""Wine36c"=dword:1234#5678\n" ""Wine36d"=dword:1234 #5678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x1234; verify_reg(hkey, "Wine36a", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine36b", REG_DWORD, &dword, sizeof(dword), 0); @@ -626,7 +626,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine37a"="foo"bar"\n" ""Wine37b"="foo""bar"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine37a"); verify_reg_nonexist(hkey, "Wine37b");
@@ -634,7 +634,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Empty string"=""\n" """="Default Value Name"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Empty string", REG_SZ, "", 1, 0); verify_reg(hkey, NULL, REG_SZ, "Default Value Name", 19, 0);
@@ -644,7 +644,7 @@ static void test_import(void) ""Test38b"=\"\n" ""Test38c"=\"Value\"\n" ""Test38d"=\"Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test38a"); verify_reg_nonexist(hkey, "Test38b"); verify_reg_nonexist(hkey, "Test38c"); @@ -656,7 +656,7 @@ static void test_import(void) ""Wine39b"="Value2"\t\t;comment\n" ""Wine39c"="Value3" #comment\n" ""Wine39d"="Value4"\t\t#comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine39a", REG_SZ, "Value1", 7, 0); verify_reg(hkey, "Wine39b", REG_SZ, "Value2", 7, 0); verify_reg_nonexist(hkey, "Wine39c"); @@ -665,43 +665,43 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""TestNoBeginQuote"=Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "TestNoBeginQuote");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""TestNoEndQuote"="Asdffdsa\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "TestNoEndQuote");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""TestNoQuotes"=Asdffdsa\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "TestNoQuotes");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "NameNoBeginQuote"="Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "NameNoBeginQuote");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""NameNoEndQuote="Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "NameNoEndQuote");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "NameNoQuotes="Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "NameNoQuotes");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""MixedQuotes=Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "MixedQuotes"); verify_reg_nonexist(hkey, "MixedQuotes=Asdffdsa");
@@ -714,7 +714,7 @@ static void test_import(void) ""Wine40e"=hex(2):4c,69,6e,65,\\n" ""Wine40f"="Value 3"\n" ""Wine40g"="Value 4"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine40a", REG_EXPAND_SZ, "Line", 5, 0); verify_reg(hkey, "Wine40b", REG_SZ, "Value 1", 8, 0); verify_reg_nonexist(hkey, "Wine40c"); @@ -729,7 +729,7 @@ static void test_import(void) "5678\n" ""Wine41b"="Test \\n" "Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine41a"); verify_reg_nonexist(hkey, "Wine41b");
@@ -737,7 +737,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""double\"quote"="valid \"or\" not"\n" ""single'quote"=dword:00000008\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "double"quote", REG_SZ, "valid "or" not", 15, 0); dword = 0x00000008; verify_reg(hkey, "single'quote", REG_DWORD, &dword, sizeof(dword), 0); @@ -746,13 +746,13 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\\n" "Subkey1]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey1", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\n" "\Subkey2]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey2", 0);
test_import_str("REGEDIT4\n\n" @@ -762,7 +762,7 @@ static void test_import(void) ""Wine42b"="Value 2"\n" ""Wine\n" "\42c"="Value 3"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine42a"); verify_reg(hkey, "Wine42b", REG_SZ, "Value 2", 8, 0); verify_reg_nonexist(hkey, "Wine42c"); @@ -795,7 +795,7 @@ static void test_import(void) ""Wine43k"=hex(0):56,00,61,00,\;comment\n" " 6c,00,75,00,\#comment\n" " 65,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine43a", REG_NONE, "V\0a\0l\0u\0e\0\0", 12, 0); verify_reg(hkey, "Wine43b", REG_NONE, "V\0a\0l\0u\0e\0\0", 12, 0); verify_reg_nonexist(hkey, "Wine43c"); @@ -835,7 +835,7 @@ static void test_import(void) ""Wine44k"=hex(2):25,50,41,\;comment\n" " 54,48,\#comment\n" " 25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine44a", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine44b", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg_nonexist(hkey, "Wine44c"); @@ -847,17 +847,17 @@ static void test_import(void) /* Wine44i */ size = sizeof(buffer); err = RegQueryValueExA(hkey, "Wine44i", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %u, expected 6\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n"); /* Wine44j */ size = sizeof(buffer); memset(buffer, '-', size); err = RegQueryValueExA(hkey, "Wine44j", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %u, expected 6\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n"); /* Wine44k */ verify_reg_nonexist(hkey, "Wine44k"); @@ -889,7 +889,7 @@ static void test_import(void) ""Wine45k"=hex:11,22,33,\;comment\n" " 44,55,66,\#comment\n" " 77,88\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); hex[0] = 0x11; hex[1] = 0x22; hex[2] = 0x33; hex[3] = 0x44; hex[4] = 0x55; hex[5] = 0x66; hex[6] = 0x77; hex[7] = 0x88; verify_reg(hkey, "Wine45a", REG_BINARY, hex, sizeof(hex), 0); @@ -908,7 +908,7 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey"1]\n" ""Wine\\31"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(hkey, "Subkey"1", 0, &subkey); verify_reg(subkey, "Wine\31", REG_SZ, "Test value", 11, 0); close_key(subkey); @@ -917,7 +917,7 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey/2]\n" ""123/\"4;'5"="Random value name"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(hkey, "Subkey/2", 0, &subkey); verify_reg(subkey, "123/"4;'5", REG_SZ, "Random value name", 18, 0); close_key(subkey); @@ -926,40 +926,40 @@ static void test_import(void) /* Test key creation */ test_import_str("REGEDIT4\n\n" "HKEY_CURRENT_USER\" KEY_BASE "\No_Opening_Bracket]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "No_Opening_Bracket", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\No_Closing_Bracket\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "No_Closing_Bracket", 0);
test_import_str("REGEDIT4\n\n" "[ HKEY_CURRENT_USER\" KEY_BASE "\Subkey1a]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey1a", 0);
test_import_str("REGEDIT4\n\n" "[\tHKEY_CURRENT_USER\" KEY_BASE "\Subkey1b]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey1b", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1c ]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1c ", 0); delete_key(hkey, "Subkey1c ", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1d\t]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1d\t", 0); delete_key(hkey, "Subkey1d\t", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1e\]\n" ""Wine"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1e\", 0); verify_key(hkey, "Subkey1e", 0); open_key(hkey, "Subkey1e", 0, &subkey); @@ -970,7 +970,7 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1f\\]\n" ""Wine"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1f\\", 0); verify_key(hkey, "Subkey1f\", 0); verify_key(hkey, "Subkey1f", 0); @@ -982,7 +982,7 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1g\\\\]\n" ""Wine"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1g\\\\", 0); verify_key(hkey, "Subkey1g\\", 0); verify_key(hkey, "Subkey1g\", 0); @@ -996,34 +996,34 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2a", 0); verify_key(hkey, "Subkey2b", 0);
test_import_str("REGEDIT4\n\n" "[ -HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2a", 0);
test_import_str("REGEDIT4\n\n" "[\t-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2b", 0);
test_import_str("REGEDIT4\n\n" "[- HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2a", 0);
test_import_str("REGEDIT4\n\n" "[-\tHKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2b", 0);
test_import_str("REGEDIT4\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey2a", 0); verify_key_nonexist(hkey, "Subkey2b", 0);
@@ -1031,28 +1031,28 @@ static void test_import(void) test_import_str("REGEDIT4\n\n" "[hkey_CURRENT_user\" KEY_BASE "\Subkey3a]\n\n" "[HkEy_CuRrEnT_uSeR\" KEY_BASE "\SuBkEy3b]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey3a", 0); verify_key(hkey, "Subkey3b", 0);
test_import_str("REGEDIT4\n\n" "[-HKEY_current_USER\" KEY_BASE "\sUBKEY3A]\n\n" "[-hKeY_cUrReNt_UsEr\" KEY_BASE "\sUbKeY3B]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey3a", 0); verify_key_nonexist(hkey, "Subkey3b", 0);
/* Test mixed key creation and deletion. We start by creating a subkey. */ test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey4a]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey4a", 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey4a]\n" ""Wine46a"=dword:12345678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey4a", 0); verify_reg_nonexist(hkey, "Wine46a");
@@ -1060,7 +1060,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n" "[HKEY_CURRENT_USERS\" KEY_BASE "\Subkey4b]\n" ""Wine46b"=dword:12345678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey4b", 0); verify_reg_nonexist(hkey, "Wine46b");
@@ -1074,7 +1074,7 @@ static void test_import(void) " 63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n" ""Wine46e"=hex(2):25,50,41,54,48,25,00\n" ""Wine46f"=hex(0):56,00,61,00,6c,00,75,00,65,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine46a", REG_SZ, "Test Value", 11, 0); verify_reg(hkey, "Wine46b", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine46c", REG_BINARY, hex, 4, 0); @@ -1090,7 +1090,7 @@ static void test_import(void) ""Wine46d"=-"Test"\n" ""Wine46e"=- ;comment\n" ""Wine46f"=- #comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine46a"); verify_reg_nonexist(hkey, "Wine46b"); verify_reg_nonexist(hkey, "Wine46c"); @@ -1113,7 +1113,7 @@ static void test_import(void) ""Wine47j"=hex(0x2):56,61,6c,75,65,00\n" ""Wine47k"=hex(0X2):56,61,6c,75,65,00\n" ""Wine47l"=hex(x2):56,61,6c,75,65,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine47a", REG_NONE, "Value", 6, 0); verify_reg(hkey, "Wine47b", 0x10, "Value", 6, 0); verify_reg(hkey, "Wine47c", 0x100, "Value", 6, 0); @@ -1133,14 +1133,14 @@ static void test_import(void) " 63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n" ""Wine48b"=hex(7):4c,69,6e,65,20,\t\\n" " 63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine48a", REG_MULTI_SZ, "Line concatenation\0", 20, 0); verify_reg(hkey, "Wine48b", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine49"=hex(2):25,50,41,54,48,25,00,\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine49", REG_EXPAND_SZ, "%PATH%", 7, 0);
test_import_str("REGEDIT4\n\n" @@ -1149,7 +1149,7 @@ static void test_import(void) ""Wine50b"=hex(2):25,50,41,54,48,25,00\t;comment\n" ""Wine50c"=hex(2):25,50,41,54,48,25,00 #comment\n" ""Wine50d"=hex(2):25,50,41,54,48,25,00\t#comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine50a", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine50b", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg_nonexist(hkey, "Wine50c"); @@ -1160,7 +1160,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine51a"=hex(0):25,50,100,54,48,25,00\n" ""Wine51b"=hex(0):25,1a4,100,164,124,25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine51a"); verify_reg_nonexist(hkey, "Wine51b");
@@ -1183,7 +1183,7 @@ static void test_import(void) " 25,48,4f,4d,45,25,00\n" ""Wine52l"=hex(2):\\n" " 25,48,4f,4d,45,25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine52a"); verify_reg_nonexist(hkey, "Wine52b"); verify_reg_nonexist(hkey, "Wine52c"); @@ -1211,7 +1211,7 @@ static void test_import(void) " 25,50,41,54,48,25,00\n" ""Wine53f"=hex(2):25,48,4f,4d,45,25,5c\\t ;comment\n" " 25,50,41,54,48,25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine53a", REG_EXPAND_SZ, "%HOME%\%PATH%", 14, 0); verify_reg_nonexist(hkey, "Wine53b"); verify_reg(hkey, "Wine53c", REG_EXPAND_SZ, "%HOME%\%PATH%", 14, 0); @@ -1223,7 +1223,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine54a"=hex(2):4c,69,6e,65,20,\\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine54a"); verify_key_nonexist(hkey, "Subkey1", 0);
@@ -1231,7 +1231,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine54b"=hex(2):4c,69,6e,65,20\\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey2]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine54b"); verify_key(hkey, "Subkey2", 0);
@@ -1255,7 +1255,7 @@ static void test_import(void)
""Wine55i"=hex(2):4c,69,6e,65,20\\n" ""Wine55j"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine55a"); verify_reg_nonexist(hkey, "Wine55b"); verify_reg_nonexist(hkey, "Wine55c"); @@ -1285,7 +1285,7 @@ static void test_import(void)
""Wine56i"=hex(2):4c,69,6e,65,20\\n" ""Wine56j"=dword:00000008\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine56a"); verify_reg_nonexist(hkey, "Wine56b"); verify_reg_nonexist(hkey, "Wine56c"); @@ -1315,7 +1315,7 @@ static void test_import(void)
""Wine57i"=hex(2):25,48,4f,4d,45,25,5c\\n" ""Wine57j"=hex(2):25,50,41,54,48,25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine57a"); verify_reg_nonexist(hkey, "Wine57b"); verify_reg_nonexist(hkey, "Wine57c"); @@ -1333,7 +1333,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine58a"=hex(2):4c,69,6e,65,20,\\n" "@="Default value 1"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58a"); verify_reg_nonexist(hkey, NULL);
@@ -1342,7 +1342,7 @@ static void test_import(void) ""Wine58b"=hex(2):4c,69,6e,65,20,\\n" ";comment\n" "@="Default value 2"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58b"); verify_reg_nonexist(hkey, NULL);
@@ -1351,7 +1351,7 @@ static void test_import(void) ""Wine58c"=hex(2):4c,69,6e,65,20,\\n" "#comment\n" "@="Default value 3"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58c"); verify_reg(hkey, NULL, REG_SZ, "Default value 3", 16, 0);
@@ -1361,7 +1361,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine58d"=hex(2):4c,69,6e,65,20,\\n\n" "@="Default value 4"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58d"); verify_reg_nonexist(hkey, NULL);
@@ -1369,7 +1369,7 @@ static void test_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine58e"=hex(2):4c,69,6e,65,20\\n" "@="Default value 5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58e"); verify_reg(hkey, NULL, REG_SZ, "Default value 5", 16, 0);
@@ -1381,7 +1381,7 @@ static void test_import(void) ""Wine59b"=hex:11,22,33,\\n" " \\n" " 44,55,66\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine59a"); verify_reg_nonexist(hkey, "Wine59b");
@@ -1392,7 +1392,7 @@ static void test_import(void) ";comment\n" " 65,6e,\;comment\n" " 61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60a", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" @@ -1402,7 +1402,7 @@ static void test_import(void) " ;comment\n" " 65,6e,\;comment\n" " 61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60b", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" @@ -1412,7 +1412,7 @@ static void test_import(void) "#comment\n" " 65,6e,\;comment\n" " 61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine60c");
test_import_str("REGEDIT4\n\n" @@ -1422,7 +1422,7 @@ static void test_import(void) " #comment\n" " 65,6e,\;comment\n" " 61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine60d");
test_import_str("REGEDIT4\n\n" @@ -1432,7 +1432,7 @@ static void test_import(void) " 63,61,74,\\n\n\n" " 65,6e,\\n\n\n\n" " 61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60e", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" @@ -1442,7 +1442,7 @@ static void test_import(void) " 63,61,74,\\n\t\n\t\n" " 65,6e,\\n\t \t\n\t \t\n\t \t\n" " 61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60f", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_str("REGEDIT4\n\n" @@ -1451,64 +1451,64 @@ static void test_import(void) " 25,50,41,54,48,25,00\n" ""Wine61b"=hex(0):25,48,4f,4d,45,25,5c/\n" " 25,50,41,54,48,25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine61a"); verify_reg_nonexist(hkey, "Wine61b");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62a"=hex(0):56,61,6c,75,65,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62a", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62a", REG_NONE, "Value", 5, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62b"=hex(2):25,50,41,54,48,25,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62b", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62b", REG_EXPAND_SZ, "%PATH%", 7, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62c"=hex:11,22,33,44,55,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62c", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62c", REG_BINARY, hex, 5, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62d"=hex(7):4c,69,6e,65,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62d", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62d", REG_MULTI_SZ, "Line", 5, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62e"=hex(100):56,61,6c,75,65,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62e", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62e", 0x100, "Value", 5, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62f"=hex(7):4c,69,6e,65,20\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine62f");
test_import_str("REGEDIT4\n\n" @@ -1517,7 +1517,7 @@ static void test_import(void) " ,63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n" ""Wine63b"=hex(7):4c,69,6e,65,20,\\n" " 63,,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine63a"); verify_reg_nonexist(hkey, "Wine63b");
@@ -1535,23 +1535,23 @@ static void test_import(void) ""Wine64e"=hex(7):4c,69,6e,65,20,\\n" " 63,6f,6e,63,61,74,;comment\n" " 65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine64a", REG_MULTI_SZ, "Line\0", 6, 0); verify_reg(hkey, "Wine64b", REG_MULTI_SZ, "Line concatenation\0", 20, 0); verify_reg(hkey, "Wine64c", REG_MULTI_SZ, "Line concatenation\0", 20, 0); /* Wine64d */ size = sizeof(buffer); err = RegQueryValueExA(hkey, "Wine64d", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %u, expected 12\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n"); /* Wine64e */ size = sizeof(buffer); err = RegQueryValueExA(hkey, "Wine64e", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %u, expected 12\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n");
test_import_str("REGEDIT4\n\n" @@ -1568,7 +1568,7 @@ static void test_import(void) ""Wine65e"=hex(100):25,50,41,\;comment\n" " 54,48,;comment\n" " 25,00\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine65a", 0x100, "%PATH%", 7, 0); verify_reg(hkey, "Wine65b", 0x100, "%PATH%", 7, 0); verify_reg(hkey, "Wine65c", 0x100, "%PATH%", 7, 0); @@ -1584,7 +1584,7 @@ static void test_import(void) ""Wine66d"=hex(7):4c,69,6e,65,00,\n" ""Wine66e"=hex(7):4c,69,6e,65,00,00\n" ""Wine66f"=hex(7):4c,69,6e,65,00,00,\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine66a", REG_MULTI_SZ, "Line", 5, 0); verify_reg(hkey, "Wine66b", REG_MULTI_SZ, "Line", 5, 0); verify_reg(hkey, "Wine66c", REG_MULTI_SZ, "Line", 5, 0); @@ -1598,7 +1598,7 @@ static void test_import(void) ""Wine67b"=hex(2):25,50,41,54,48,25,\n" ""Wine67c"=hex(2):25,50,41,54,48,25,00\n" ""Wine67d"=hex(2):25,50,41,54,48,25,00,\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine67a", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine67b", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine67c", REG_EXPAND_SZ, "%PATH%", 7, 0); @@ -1615,7 +1615,7 @@ static void test_import(void) ""Wine68g"=hex(abcd):\n" ""Wine68h"=hex:\n" ""Wine68i"=hex(0):\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine68a", REG_SZ, NULL, 0, 0); verify_reg(hkey, "Wine68b", REG_EXPAND_SZ, NULL, 0, 0); verify_reg(hkey, "Wine68c", REG_BINARY, NULL, 0, 0); @@ -1635,7 +1635,7 @@ static void test_import(void) ""Wine69d"="Value2\\0\\0\\0\\0"\n" ""Wine69e"="Value3\\0Value4"\n" ""Wine69f"="\\0Value5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine69a", REG_SZ, "\0", 3, 0); verify_reg(hkey, "Wine69b", REG_SZ, "\0\0", 5, 0); verify_reg(hkey, "Wine69c", REG_SZ, "Value1\0", 9, 0); @@ -1651,7 +1651,7 @@ static void test_import(void) ""Wine70d"="Value2\0\0\0\0"\n" ""Wine70e"="Value3\0Value4"\n" ""Wine70f"="\0Value5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine70a"); verify_reg_nonexist(hkey, "Wine70b"); verify_reg_nonexist(hkey, "Wine70c"); @@ -1665,7 +1665,7 @@ static void test_import(void) ""count/up"="one/two/three"\n" ""\\foo\\bar"=""\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\https://winehq.org%5D%5Cn%5Cn", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "count/up", REG_SZ, "one/two/three", 14, 0); verify_reg(hkey, "\foo\bar", REG_SZ, "", 1, 0); verify_key(hkey, "https://winehq.org", 0); @@ -1687,196 +1687,196 @@ static void test_unicode_import(void)
test_import_wstr("REGEDIT\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("REGEDIT4\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT4", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT4\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbf REGEDIT4\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbf\tREGEDIT4\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbf\nREGEDIT4\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("\xef\xbb\xbfREGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_CURRENT_USER, KEY_BASE, KEY_SET_VALUE, &hkey);
test_import_wstr("\xef\xbb\xbfREGEDIT3\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test1"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test1");
test_import_wstr("\xef\xbb\xbfregedit4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test2"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test2");
test_import_wstr("\xef\xbb\xbfRegedit4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test3"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test3");
test_import_wstr("\xef\xbb\xbfREGEDIT 4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test4"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test4");
test_import_wstr("\xef\xbb\xbfREGEDIT4FOO\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test5"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test5");
test_import_wstr("\xef\xbb\xbfREGEDIT4 FOO\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test6"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test6");
test_import_wstr("\xef\xbb\xbfREGEDIT5\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test7"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test7");
test_import_wstr("\xef\xbb\xbfREGEDIT9\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test8"="Value"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test8");
test_import_wstr("\xef\xbb\xbfREGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Unicode1"="Value1"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Unicode1", REG_SZ, "Value1", 7, 0);
test_import_wstr("\xef\xbb\xbfREGEDIT4\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Unicode2"="Value2"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Unicode2", REG_SZ, "Value2", 7, 0);
test_import_wstr("\xef\xbb\xbfREGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Unicode3"="Value3"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Unicode3", REG_SZ, "Value3", 7, 0);
test_import_wstr("Windows Registry Editor Version 4.00\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("Windows Registry Editor Version 5.00\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbfWINDOWS Registry Editor Version 5.00\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("\xef\xbb\xbf Windows Registry Editor Version 5.00\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbf\tWindows Registry Editor Version 5.00\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
test_import_wstr("\xef\xbb\xbf\nWindows Registry Editor Version 5.00\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 4.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test9"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test9");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test10"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test10");
test_import_wstr("\xef\xbb\xbfWINDOWS REGISTRY EDITOR VERSION 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test11"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test11");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Test12"="Value"\n", &r); ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */, - "got exit code %d, expected 1\n", r); + "got exit code %ld, expected 1\n", r); verify_reg_nonexist(hkey, "Test12");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine"=dword:00000123\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine", REG_DWORD, &dword, sizeof(dword), 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "@="Test string"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, NULL, REG_SZ, "Test string", 12, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Unicode4"="Value4"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Unicode4", REG_SZ, "Value4", 7, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Unicode5"="Value5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Unicode5", REG_SZ, "Value5", 7, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Unicode6"="Value6"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Unicode6", REG_SZ, "Value6", 7, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -1885,7 +1885,7 @@ static void test_unicode_import(void) ""Line2"="Value2"\n\n\n" ""Line3"="Value3"\n\n\n\n" ""Line4"="Value4"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Line1", REG_SZ, "Value1", 7, 0); verify_reg(hkey, "Line2", REG_SZ, "Value2", 7, 0); verify_reg(hkey, "Line3", REG_SZ, "Value3", 7, 0); @@ -1901,7 +1901,7 @@ static void test_unicode_import(void) "@="Test"\n" ";comment\n\n" ""Wine4"=dword:12345678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x782; verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine2", REG_SZ, "Test Value", 11, 0); @@ -1913,10 +1913,10 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfREGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine5"="No newline"", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine5", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND /* WinXP */), - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine5", REG_SZ, "No newline", 11, 0);
@@ -1924,12 +1924,12 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine6"=dword:00000050\n\n" ""Wine7"="No newline"", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x50; verify_reg(hkey, "Wine6", REG_DWORD, &dword, sizeof(dword), 0); err = RegQueryValueExA(hkey, "Wine7", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND /* WinXP */), - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine7", REG_SZ, "No newline", 11, 0);
@@ -1939,7 +1939,7 @@ static void test_unicode_import(void) ""Wine8"="Line 1"\n" ";comment\\n" ""Wine9"="Line 2"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine8", REG_SZ, "Line 1", 7, 0); verify_reg(hkey, "Wine9", REG_SZ, "Line 2", 7, 0);
@@ -1949,7 +1949,7 @@ static void test_unicode_import(void) ""Wine11"="Value 2";comment\n" ""Wine12"=dword:01020304 #comment\n" ""Wine13"=dword:02040608 ;comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine10"); verify_reg(hkey, "Wine11", REG_SZ, "Value 2", 8, 0); verify_reg_nonexist(hkey, "Wine12"); @@ -1966,7 +1966,7 @@ static void test_unicode_import(void) " ;comment\n" " 61,00,74,00,65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n" ""Wine17"="Another valid line"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine14"); verify_reg(hkey, "Wine15", REG_SZ, "A valid line", 13, 0); verify_reg(hkey, "Wine16", REG_MULTI_SZ, "Line concatenation\0", 20, 0); @@ -1980,7 +1980,7 @@ static void test_unicode_import(void) " ;"Comment4"="Value 4"\n" ""Wine18"="Value 6"#"Comment5"="Value 5"\n" ""Wine19"="Value 7";"Comment6"="Value 6"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Comment1"); verify_reg_nonexist(hkey, "Comment2"); verify_reg_nonexist(hkey, "Comment3"); @@ -2004,7 +2004,7 @@ static void test_unicode_import(void) ""Wine29"=;dword:00000002\n" ""Wine30"=dword:00000003#comment\n" ""Wine31"=dword:00000004;comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine20"); verify_reg_nonexist(hkey, "Wine21"); verify_reg(hkey, "Wine22", REG_SZ, "#comment1", 10, 0); @@ -2023,7 +2023,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine32a"=dword:1\n" ""Wine32b"=dword:4444\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x1; verify_reg(hkey, "Wine32a", REG_DWORD, &dword, sizeof(dword), 0); dword = 0x4444; @@ -2036,7 +2036,7 @@ static void test_unicode_import(void) ""Wine33c"=dword:123456789\n" ""Wine33d"=dword:012345678\n" ""Wine33e"=dword:000000001\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine33a"); verify_reg_nonexist(hkey, "Wine33b"); verify_reg_nonexist(hkey, "Wine33c"); @@ -2047,7 +2047,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine34a"=dword:12345678abc\n" ""Wine34b"=dword:12345678 abc\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine34a"); verify_reg_nonexist(hkey, "Wine34b");
@@ -2056,7 +2056,7 @@ static void test_unicode_import(void) ""Wine35a"=dword:0x123\n" ""Wine35b"=dword:123 456\n" ""Wine35c"=dword:1234 5678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine35a"); verify_reg_nonexist(hkey, "Wine35b"); verify_reg_nonexist(hkey, "Wine35c"); @@ -2067,7 +2067,7 @@ static void test_unicode_import(void) ""Wine36b"=dword:1234 ;5678\n" ""Wine36c"=dword:1234#5678\n" ""Wine36d"=dword:1234 #5678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x1234; verify_reg(hkey, "Wine36a", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine36b", REG_DWORD, &dword, sizeof(dword), 0); @@ -2078,7 +2078,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine37a"="foo"bar"\n" ""Wine37b"="foo""bar"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine37a"); verify_reg_nonexist(hkey, "Wine37b");
@@ -2086,7 +2086,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Empty string"=""\n" """="Default registry value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Empty string", REG_SZ, "", 1, 0); verify_reg(hkey, NULL, REG_SZ, "Default registry value", 23, 0);
@@ -2096,7 +2096,7 @@ static void test_unicode_import(void) ""Test38b"=\"\n" ""Test38c"=\"Value\"\n" ""Test38d"=\"Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Test38a"); verify_reg_nonexist(hkey, "Test38b"); verify_reg_nonexist(hkey, "Test38c"); @@ -2108,7 +2108,7 @@ static void test_unicode_import(void) ""Wine39b"="Value2"\t\t;comment\n" ""Wine39c"="Value3" #comment\n" ""Wine39d"="Value4"\t\t#comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine39a", REG_SZ, "Value1", 7, 0); verify_reg(hkey, "Wine39b", REG_SZ, "Value2", 7, 0); verify_reg_nonexist(hkey, "Wine39c"); @@ -2117,43 +2117,43 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""TestNoBeginQuote"=Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "TestNoBeginQuote");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""TestNoEndQuote"="Asdffdsa\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "TestNoEndQuote");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""TestNoQuotes"=Asdffdsa\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "TestNoQuotes");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "NameNoBeginQuote"="Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "NameNoBeginQuote");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""NameNoEndQuote="Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "NameNoEndQuote");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "NameNoQuotes="Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "NameNoQuotes");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""MixedQuotes=Asdffdsa"\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "MixedQuotes"); verify_reg_nonexist(hkey, "MixedQuotes=Asdffdsa");
@@ -2166,7 +2166,7 @@ static void test_unicode_import(void) ""Wine40e"=hex(2):4c,00,69,00,6e,00,65,00,\\n" ""Wine40f"="Value 3"\n" ""Wine40g"="Value 4"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine40a", REG_EXPAND_SZ, "Line", 5, 0); verify_reg(hkey, "Wine40b", REG_SZ, "Value 1", 8, 0); verify_reg_nonexist(hkey, "Wine40c"); @@ -2181,7 +2181,7 @@ static void test_unicode_import(void) " 63,00,6f,00,6e,00,\;comment\n" " 63,00,61,00,74,00,\;comment\n" " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line1", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2190,35 +2190,35 @@ static void test_unicode_import(void) " 63,00,6f,00,6e,00,\;comment\n" " 63,00,61,00,74,00,;comment\n" " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line2", REG_MULTI_SZ, "Line concat", 12, 0);
test_import_wstr("\xef\xbb\xbfREGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line3"=hex(7):4c,69,6e,65,20\\n" ",63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line3");
test_import_wstr("\xef\xbb\xbfREGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line4"=hex(7):4c,69,6e,65,20\\n" " ,63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line4");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line5"=hex(7):4c,69,6e,65,20\\n" ",63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line5");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Multi-Line6"=hex(7):4c,69,6e,65,20\\n" " ,63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line6");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2228,7 +2228,7 @@ static void test_unicode_import(void) " 63,00,6f,00,6e,00,\;comment\n" " 63,00,61,00,74,00,\;comment\n" " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line7", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2238,7 +2238,7 @@ static void test_unicode_import(void) " 63,00,6f,00,6e,00,\;#comment\n" " 63,00,61,00,74,00,\;#comment\n" " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line8", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2248,7 +2248,7 @@ static void test_unicode_import(void) " 63,00,6f,00,6e,00,\;comment\n" " 63,00,61,00,74,00,\#comment\n" " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Multi-Line9");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2258,7 +2258,7 @@ static void test_unicode_import(void) " 63,00,61,00,74,00,\\n\n" " 65,00,6e,00,\;comment\n\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Multi-Line10", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2267,7 +2267,7 @@ static void test_unicode_import(void) "5678\n" ""Wine41b"="Test \\n" "Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine41a"); verify_reg_nonexist(hkey, "Wine41b");
@@ -2275,7 +2275,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""double\"quote"="valid \"or\" not"\n" ""single'quote"=dword:00000008\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "double"quote", REG_SZ, "valid "or" not", 15, 0); dword = 0x00000008; verify_reg(hkey, "single'quote", REG_DWORD, &dword, sizeof(dword), 0); @@ -2284,13 +2284,13 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\\n" "Subkey1]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey1", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\n" "\Subkey2]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey2", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2300,7 +2300,7 @@ static void test_unicode_import(void) ""Wine42b"="Value 2"\n" ""Wine\n" "\42c"="Value 3"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine42a"); verify_reg(hkey, "Wine42b", REG_SZ, "Value 2", 8, 0); verify_reg_nonexist(hkey, "Wine42c"); @@ -2333,7 +2333,7 @@ static void test_unicode_import(void) ""Wine43k"=hex(0):56,00,61,00,\;comment\n" " 6c,00,75,00,\#comment\n" " 65,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine43a", REG_NONE, "V\0a\0l\0u\0e\0\0", 12, 0); verify_reg(hkey, "Wine43b", REG_NONE, "V\0a\0l\0u\0e\0\0", 12, 0); verify_reg_nonexist(hkey, "Wine43c"); @@ -2373,7 +2373,7 @@ static void test_unicode_import(void) ""Wine44k"=hex(2):25,00,50,00,41,00,\;comment\n" " 54,00,48,00,\#comment\n" " 25,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine44a", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine44b", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg_nonexist(hkey, "Wine44c"); @@ -2385,17 +2385,17 @@ static void test_unicode_import(void) /* Wine44i */ size = sizeof(buffer); err = RegQueryValueExA(hkey, "Wine44i", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %u, expected 6\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n"); /* Wine44j */ size = sizeof(buffer); memset(buffer, '-', size); err = RegQueryValueExA(hkey, "Wine44j", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_EXPAND_SZ, "got wrong type %u, expected %u\n", type, REG_EXPAND_SZ); - ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %u, expected 6\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_EXPAND_SZ, "got wrong type %lu, expected %u\n", type, REG_EXPAND_SZ); + ok(size == 6 || broken(size == 5) /* WinXP */, "got wrong size %lu, expected 6\n", size); ok(memcmp(buffer, "%PATH", size) == 0, "got wrong data\n"); /* Wine44k */ verify_reg_nonexist(hkey, "Wine44k"); @@ -2427,7 +2427,7 @@ static void test_unicode_import(void) ""Wine45k"=hex:11,22,33,\;comment\n" " 44,55,66,\#comment\n" " 77,88\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); hex[0] = 0x11; hex[1] = 0x22; hex[2] = 0x33; hex[3] = 0x44; hex[4] = 0x55; hex[5] = 0x66; hex[6] = 0x77; hex[7] = 0x88; verify_reg(hkey, "Wine45a", REG_BINARY, hex, sizeof(hex), 0); @@ -2446,7 +2446,7 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey"1]\n" ""Wine\\31"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(hkey, "Subkey"1", 0, &subkey); verify_reg(subkey, "Wine\31", REG_SZ, "Test value", 11, 0); close_key(subkey); @@ -2455,7 +2455,7 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey/2]\n" ""123/\"4;'5"="Random value name"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(hkey, "Subkey/2", 0, &subkey); verify_reg(subkey, "123/"4;'5", REG_SZ, "Random value name", 18, 0); close_key(subkey); @@ -2464,40 +2464,40 @@ static void test_unicode_import(void) /* Test key creation */ test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "HKEY_CURRENT_USER\" KEY_BASE "\No_Opening_Bracket]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "No_Opening_Bracket", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\No_Closing_Bracket\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "No_Closing_Bracket", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[ HKEY_CURRENT_USER\" KEY_BASE "\Subkey1a]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey1a", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[\tHKEY_CURRENT_USER\" KEY_BASE "\Subkey1b]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey1b", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1c ]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1c ", 0); delete_key(hkey, "Subkey1c ", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1d\t]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1d\t", 0); delete_key(hkey, "Subkey1d\t", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1e\]\n" ""Wine"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1e\", 0); verify_key(hkey, "Subkey1e", 0); open_key(hkey, "Subkey1e", 0, &subkey); @@ -2508,7 +2508,7 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1f\\]\n" ""Wine"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1f\\", 0); verify_key(hkey, "Subkey1f\", 0); verify_key(hkey, "Subkey1f", 0); @@ -2520,7 +2520,7 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1g\\\\]\n" ""Wine"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey1g\\\\", 0); verify_key(hkey, "Subkey1g\\", 0); verify_key(hkey, "Subkey1g\", 0); @@ -2534,34 +2534,34 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2a", 0); verify_key(hkey, "Subkey2b", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[ -HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2a", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[\t-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2b", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[- HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2a", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[-\tHKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey2b", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2a]\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey2b]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey2a", 0); verify_key_nonexist(hkey, "Subkey2b", 0);
@@ -2569,28 +2569,28 @@ static void test_unicode_import(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[hkey_CURRENT_user\" KEY_BASE "\Subkey3a]\n\n" "[HkEy_CuRrEnT_uSeR\" KEY_BASE "\SuBkEy3b]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey3a", 0); verify_key(hkey, "Subkey3b", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[-HKEY_current_USER\" KEY_BASE "\sUBKEY3A]\n\n" "[-hKeY_cUrReNt_UsEr\" KEY_BASE "\sUbKeY3B]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey3a", 0); verify_key_nonexist(hkey, "Subkey3b", 0);
/* Test mixed key creation and deletion. We start by creating a subkey. */ test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey4a]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key(hkey, "Subkey4a", 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n" "[-HKEY_CURRENT_USER\" KEY_BASE "\Subkey4a]\n" ""Wine46a"=dword:12345678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey4a", 0); verify_reg_nonexist(hkey, "Wine46a");
@@ -2598,7 +2598,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n" "[HKEY_CURRENT_USERS\" KEY_BASE "\Subkey4b]\n" ""Wine46b"=dword:12345678\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_key_nonexist(hkey, "Subkey4b", 0); verify_reg_nonexist(hkey, "Wine46b");
@@ -2613,7 +2613,7 @@ static void test_unicode_import(void) " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n" ""Wine46e"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" ""Wine46f"=hex(0):56,00,61,00,6c,00,75,00,65,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine46a", REG_SZ, "Test Value", 11, 0); verify_reg(hkey, "Wine46b", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine46c", REG_BINARY, hex, 4, 0); @@ -2629,7 +2629,7 @@ static void test_unicode_import(void) ""Wine46d"=-"Test"\n" ""Wine46e"=- ;comment\n" ""Wine46f"=- #comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine46a"); verify_reg_nonexist(hkey, "Wine46b"); verify_reg_nonexist(hkey, "Wine46c"); @@ -2652,7 +2652,7 @@ static void test_unicode_import(void) ""Wine47j"=hex(0x2):56,00,61,00,6c,00,75,00,65,00,00,00\n" ""Wine47k"=hex(0X2):56,00,61,00,6c,00,75,00,65,00,00,00\n" ""Wine47l"=hex(x2):56,00,61,00,6c,00,75,00,65,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine47a", REG_NONE, "Value", 6, 0); verify_reg(hkey, "Wine47b", 0x10, "Value", 6, 0); verify_reg(hkey, "Wine47c", 0x100, "Value", 6, 0); @@ -2674,14 +2674,14 @@ static void test_unicode_import(void) ""Wine48b"=hex(7):4c,00,69,00,6e,00,65,00,20,00,\t\\n" " 63,00,6f,00,6e,00,63,00,61,00,74,00,\t \t \\n" " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine48a", REG_MULTI_SZ, "Line concatenation\0", 20, 0); verify_reg(hkey, "Wine48b", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine49"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00,\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine49", REG_EXPAND_SZ, "%PATH%", 7, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2690,7 +2690,7 @@ static void test_unicode_import(void) ""Wine50b"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00\t;comment\n" ""Wine50c"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00 #comment\n" ""Wine50d"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00\t#comment\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine50a", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine50b", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg_nonexist(hkey, "Wine50c"); @@ -2701,7 +2701,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine51a"=hex(0):25,50,100,54,48,25,00\n" ""Wine51b"=hex(0):25,1a4,100,164,124,25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine51a"); verify_reg_nonexist(hkey, "Wine51b");
@@ -2724,7 +2724,7 @@ static void test_unicode_import(void) " 25,00,48,00,4f,00,4d,00,45,00,25,00,00,00\n" ""Wine52l"=hex(2):\\n" " 25,00,48,00,4f,00,4d,00,45,00,25,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine52a"); verify_reg_nonexist(hkey, "Wine52b"); verify_reg_nonexist(hkey, "Wine52c"); @@ -2752,7 +2752,7 @@ static void test_unicode_import(void) " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" ""Wine53f"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00\\t ;comment\n" " 25,00,50,00,41,00,54,00,48,00,25,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine53a", REG_EXPAND_SZ, "%HOME%\%PATH%", 14, 0); verify_reg_nonexist(hkey, "Wine53b"); verify_reg(hkey, "Wine53c", REG_EXPAND_SZ, "%HOME%\%PATH%", 14, 0); @@ -2764,7 +2764,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine54a"=hex(2):4c,00,69,00,6e,00,65,00,20,00,\\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey1]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine54a"); verify_key_nonexist(hkey, "Subkey1", 0);
@@ -2772,7 +2772,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine54b"=hex(2):4c,00,69,00,6e,00,65,00,20,00\\n" "[HKEY_CURRENT_USER\" KEY_BASE "\Subkey2]\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine54b"); verify_key(hkey, "Subkey2", 0);
@@ -2796,7 +2796,7 @@ static void test_unicode_import(void)
""Wine55i"=hex(2):4c,00,69,00,6e,00,65,00,20,00\\n" ""Wine55j"="Test value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine55a"); verify_reg_nonexist(hkey, "Wine55b"); verify_reg_nonexist(hkey, "Wine55c"); @@ -2826,7 +2826,7 @@ static void test_unicode_import(void)
""Wine56i"=hex(2):4c,00,69,00,6e,00,65,00,20,00\\n" ""Wine56j"=dword:00000008\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine56a"); verify_reg_nonexist(hkey, "Wine56b"); verify_reg_nonexist(hkey, "Wine56c"); @@ -2856,7 +2856,7 @@ static void test_unicode_import(void)
""Wine57i"=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00\\n" ""Wine57j"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine57a"); verify_reg_nonexist(hkey, "Wine57b"); verify_reg_nonexist(hkey, "Wine57c"); @@ -2874,7 +2874,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine58a"=hex(2):4c,00,69,00,6e,00,65,00,20,00,\\n" "@="Default value 1"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58a"); verify_reg_nonexist(hkey, NULL);
@@ -2883,7 +2883,7 @@ static void test_unicode_import(void) ""Wine58b"=hex(2):4c,00,69,00,6e,00,65,00,20,00,\\n" ";comment\n" "@="Default value 2"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58b"); verify_reg_nonexist(hkey, NULL);
@@ -2892,7 +2892,7 @@ static void test_unicode_import(void) ""Wine58c"=hex(2):4c,00,69,00,6e,00,65,00,20,00,\\n" "#comment\n" "@="Default value 3"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58c"); verify_reg(hkey, NULL, REG_SZ, "Default value 3", 16, 0);
@@ -2902,7 +2902,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine58d"=hex(2):4c,00,69,00,6e,00,65,00,20,00,\\n\n" "@="Default value 4"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58d"); verify_reg_nonexist(hkey, NULL);
@@ -2910,7 +2910,7 @@ static void test_unicode_import(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine58e"=hex(2):4c,00,69,00,6e,00,65,00,20,00\\n" "@="Default value 5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine58e"); verify_reg(hkey, NULL, REG_SZ, "Default value 5", 16, 0);
@@ -2922,7 +2922,7 @@ static void test_unicode_import(void) ""Wine59b"=hex:11,22,33,\\n" " \\n" " 44,55,66\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine59a"); verify_reg_nonexist(hkey, "Wine59b");
@@ -2933,7 +2933,7 @@ static void test_unicode_import(void) ";comment\n" " 65,00,6e,00,\;comment\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60a", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2943,7 +2943,7 @@ static void test_unicode_import(void) " ;comment\n" " 65,00,6e,00,\;comment\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60b", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2953,7 +2953,7 @@ static void test_unicode_import(void) "#comment\n" " 65,00,6e,00,\;comment\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine60c");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2963,7 +2963,7 @@ static void test_unicode_import(void) " #comment\n" " 65,00,6e,00,\;comment\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine60d");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2973,7 +2973,7 @@ static void test_unicode_import(void) " 63,00,61,00,74,00,\\n\n\n" " 65,00,6e,00,\\n\n\n\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60e", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2983,7 +2983,7 @@ static void test_unicode_import(void) " 63,00,61,00,74,00,\\n\t\n\t\n" " 65,00,6e,00,\\n\t \t\n\t \t\n\t \t\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine60f", REG_MULTI_SZ, "Line concatenation\0", 20, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -2992,64 +2992,64 @@ static void test_unicode_import(void) " 25,50,41,54,48,25,00\n" ""Wine61b"=hex(0):25,48,4f,4d,45,25,5c/\n" " 25,50,41,54,48,25,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine61a"); verify_reg_nonexist(hkey, "Wine61b");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62a"=hex(0):56,61,6c,75,65,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62a", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62a", REG_NONE, "Value", 5, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62b"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62b", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62b", REG_EXPAND_SZ, "%PATH%", 7, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62c"=hex:11,22,33,44,55,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62c", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62c", REG_BINARY, hex, 5, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62d"=hex(7):4c,00,69,00,6e,00,65,00,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62d", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62d", REG_MULTI_SZ, "Line", 5, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62e"=hex(100):56,61,6c,75,65,\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); err = RegQueryValueExA(hkey, "Wine62e", NULL, NULL, NULL, NULL); ok(err == ERROR_SUCCESS || broken(err == ERROR_FILE_NOT_FOUND) /* WinXP */, - "got exit code %d, expected 0\n", err); + "got exit code %ld, expected 0\n", err); if (err == ERROR_SUCCESS) verify_reg(hkey, "Wine62e", 0x100, "Value", 5, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine62f"=hex(7):4c,00,69,00,6e,00,65,00,20,00\", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine62f");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -3064,7 +3064,7 @@ static void test_unicode_import(void) " 63,00,61,00,74,00,\\n" " 65,00,6e,00,\\n" " 61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine63a"); verify_reg_nonexist(hkey, "Wine63b");
@@ -3083,23 +3083,23 @@ static void test_unicode_import(void) ""Wine64e"=hex(7):4c,00,69,00,6e,00,65,00,20,00,\\n" " 63,00,6f,00,6e,00,63,00,61,00,74,00,;comment\n" " 65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine64a", REG_MULTI_SZ, "Line\0", 6, 0); verify_reg(hkey, "Wine64b", REG_MULTI_SZ, "Line concatenation\0", 20, 0); verify_reg(hkey, "Wine64c", REG_MULTI_SZ, "Line concatenation\0", 20, 0); /* Wine64d */ size = sizeof(buffer); err = RegQueryValueExA(hkey, "Wine64d", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %u, expected 12\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n"); /* Wine64e */ size = sizeof(buffer); err = RegQueryValueExA(hkey, "Wine64e", NULL, &type, (BYTE *)&buffer, &size); - ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", err); - ok(type == REG_MULTI_SZ, "got wrong type %u, expected %u\n", type, REG_MULTI_SZ); - ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %u, expected 12\n", size); + ok(err == ERROR_SUCCESS, "RegQueryValueExA failed: %ld\n", err); + ok(type == REG_MULTI_SZ, "got wrong type %lu, expected %u\n", type, REG_MULTI_SZ); + ok(size == 12 || broken(size == 11) /* WinXP */, "got wrong size %lu, expected 12\n", size); ok(memcmp(buffer, "Line concat", size) == 0, "got wrong data\n");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" @@ -3116,7 +3116,7 @@ static void test_unicode_import(void) ""Wine65e"=hex(100):25,50,41,\;comment\n" " 54,48,;comment\n" " 25,00\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine65a", 0x100, "%PATH%", 7, 0); verify_reg(hkey, "Wine65b", 0x100, "%PATH%", 7, 0); verify_reg(hkey, "Wine65c", 0x100, "%PATH%", 7, 0); @@ -3132,7 +3132,7 @@ static void test_unicode_import(void) ""Wine66d"=hex(7):4c,00,69,00,6e,00,65,00,00,00,\n" ""Wine66e"=hex(7):4c,00,69,00,6e,00,65,00,00,00,00,00\n" ""Wine66f"=hex(7):4c,00,69,00,6e,00,65,00,00,00,00,00,\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine66a", REG_MULTI_SZ, "Line", 5, 0); verify_reg(hkey, "Wine66b", REG_MULTI_SZ, "Line", 5, 0); verify_reg(hkey, "Wine66c", REG_MULTI_SZ, "Line", 5, 0); @@ -3146,7 +3146,7 @@ static void test_unicode_import(void) ""Wine67b"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,\n" ""Wine67c"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00\n" ""Wine67d"=hex(2):25,00,50,00,41,00,54,00,48,00,25,00,00,00,\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine67a", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine67b", REG_EXPAND_SZ, "%PATH%", 7, 0); verify_reg(hkey, "Wine67c", REG_EXPAND_SZ, "%PATH%", 7, 0); @@ -3163,7 +3163,7 @@ static void test_unicode_import(void) ""Wine68g"=hex(abcd):\n" ""Wine68h"=hex:\n" ""Wine68i"=hex(0):\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine68a", REG_SZ, NULL, 0, 0); verify_reg(hkey, "Wine68b", REG_EXPAND_SZ, NULL, 0, 0); verify_reg(hkey, "Wine68c", REG_BINARY, NULL, 0, 0); @@ -3183,7 +3183,7 @@ static void test_unicode_import(void) ""Wine69d"="Value2\\0\\0\\0\\0"\n" ""Wine69e"="Value3\\0Value4"\n" ""Wine69f"="\\0Value5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine69a", REG_SZ, "\0", 3, 0); verify_reg(hkey, "Wine69b", REG_SZ, "\0\0", 5, 0); verify_reg(hkey, "Wine69c", REG_SZ, "Value1\0", 9, 0); @@ -3199,7 +3199,7 @@ static void test_unicode_import(void) ""Wine70d"="Value2\0\0\0\0"\n" ""Wine70e"="Value3\0Value4"\n" ""Wine70f"="\0Value5"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "Wine70a"); verify_reg_nonexist(hkey, "Wine70b"); verify_reg_nonexist(hkey, "Wine70c"); @@ -3213,7 +3213,7 @@ static void test_unicode_import(void) ""count/up"="one/two/three"\n" ""\\foo\\bar"=""\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "\https://winehq.org%5D%5Cn%5Cn", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "count/up", REG_SZ, "one/two/three", 14, 0); verify_reg(hkey, "\foo\bar", REG_SZ, "", 1, 0); verify_key(hkey, "https://winehq.org", 0); @@ -3232,62 +3232,62 @@ static void test_import_with_whitespace(void)
test_import_str(" REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
test_import_str(" REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine1a"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine1a", REG_SZ, "Value", 6, 0);
test_import_str("\tREGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine1b"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine1b", REG_SZ, "Value", 6, 0);
test_import_str(" \t REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine1c"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine1c", REG_SZ, "Value", 6, 0);
test_import_str("REGEDIT4\n\n" " [HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine2a"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine2a", REG_SZ, "Value", 6, 0);
test_import_str("REGEDIT4\n\n" "\t[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine2b"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine2b", REG_SZ, "Value", 6, 0);
test_import_str("REGEDIT4\n\n" " \t [HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine2c"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine2c", REG_SZ, "Value", 6, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" " "Wine3a"="Two leading spaces"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine3a", REG_SZ, "Two leading spaces", 19, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "\t"Wine3b"="One leading tab"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine3b", REG_SZ, "One leading tab", 16, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" " \t "Wine3c"="Space, tab, space"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine3c", REG_SZ, "Space, tab, space", 18, 0);
test_import_str(" REGEDIT4\n\n" @@ -3298,7 +3298,7 @@ static void test_import_with_whitespace(void) " 63,6f,6e,\;comment\n" "\t\t\t\t63,61,74,\;comment\n" " \t65,6e,61,74,69,6f,6e,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine4a", REG_SZ, "Tab and four spaces", 20, 0); dword = 0x112233; verify_reg(hkey, "Wine4b", REG_DWORD, &dword, sizeof(dword), 0); @@ -3310,7 +3310,7 @@ static void test_import_with_whitespace(void) "\t\t"Wine5b"\t\t="Leading tabs"\n" "\t "Wine5c"=\t "Tabs and spaces"\n" " "Wine5d" \t = \t "More whitespace"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine5a", REG_SZ, "Leading spaces", 15, 0); verify_reg(hkey, "Wine5b", REG_SZ, "Leading tabs", 13, 0); verify_reg(hkey, "Wine5c", REG_SZ, "Tabs and spaces", 16, 0); @@ -3321,7 +3321,7 @@ static void test_import_with_whitespace(void) "" Wine6a"="Leading spaces"\n" ""\t\tWine6b"="Leading tabs"\n" " " Wine6c " = " Spaces everywhere " \n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, " Wine6a", REG_SZ, "Leading spaces", 15, 0); verify_reg(hkey, "\t\tWine6b", REG_SZ, "Leading tabs", 13, 0); verify_reg(hkey, " Wine6c ", REG_SZ, " Spaces everywhere ", 22, 0); @@ -3330,7 +3330,7 @@ static void test_import_with_whitespace(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine7a"=" Four spaces in the data"\n" ""Wine7b"="\t\tTwo tabs in the data"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine7a", REG_SZ, " Four spaces in the data", 28, 0); verify_reg(hkey, "Wine7b", REG_SZ, "\t\tTwo tabs in the data", 23, 0);
@@ -3338,7 +3338,7 @@ static void test_import_with_whitespace(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine8a"="Trailing spaces" \n" ""Wine8b"="Trailing tabs and spaces"\t \t\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine8a", REG_SZ, "Trailing spaces", 16, 0); verify_reg(hkey, "Wine8b", REG_SZ, "Trailing tabs and spaces", 25, 0);
@@ -3346,7 +3346,7 @@ static void test_import_with_whitespace(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine9a"=dword: 00000008\n" ""Wine9b"=dword:\t\t00000008\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x00000008; verify_reg(hkey, "Wine9a", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine9b", REG_DWORD, &dword, sizeof(dword), 0); @@ -3354,13 +3354,13 @@ static void test_import_with_whitespace(void) test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "@ = "Test Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "Test Value", 11, 0);
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "\t@\t=\tdword:\t00000008\t\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_DWORD, &dword, sizeof(DWORD), 0);
close_key(hkey); @@ -3377,62 +3377,62 @@ static void test_unicode_import_with_whitespace(void)
test_import_wstr("\xef\xbb\xbf Windows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
test_import_wstr("\xef\xbb\xbf Windows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine1a"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine1a", REG_SZ, "Value", 6, 0);
test_import_wstr("\xef\xbb\xbf\tWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine1b"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine1b", REG_SZ, "Value", 6, 0);
test_import_wstr("\xef\xbb\xbf \t Windows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine1c"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine1c", REG_SZ, "Value", 6, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" " [HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine2a"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine2a", REG_SZ, "Value", 6, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "\t[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine2b"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine2b", REG_SZ, "Value", 6, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" " \t [HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine2c"="Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine2c", REG_SZ, "Value", 6, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" " "Wine3a"="Two leading spaces"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine3a", REG_SZ, "Two leading spaces", 19, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "\t"Wine3b"="One leading tab"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine3b", REG_SZ, "One leading tab", 16, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" " \t "Wine3c"="Space, tab, space"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine3c", REG_SZ, "Space, tab, space", 18, 0);
test_import_wstr("\xef\xbb\xbf Windows Registry Editor Version 5.00\n\n" @@ -3443,7 +3443,7 @@ static void test_unicode_import_with_whitespace(void) " 63,00,6f,00,6e,00,\;comment\n" "\t\t\t\t63,00,61,00,74,00,\;comment\n" " \t65,00,6e,00,61,00,74,00,69,00,6f,00,6e,00,00,00,00,00\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine4a", REG_SZ, "Tab and four spaces", 20, 0); dword = 0x112233; verify_reg(hkey, "Wine4b", REG_DWORD, &dword, sizeof(dword), 0); @@ -3455,7 +3455,7 @@ static void test_unicode_import_with_whitespace(void) "\t\t"Wine5b"\t\t="Leading tabs"\n" "\t "Wine5c"=\t "Tabs and spaces"\n" " "Wine5d" \t = \t "More whitespace"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine5a", REG_SZ, "Leading spaces", 15, 0); verify_reg(hkey, "Wine5b", REG_SZ, "Leading tabs", 13, 0); verify_reg(hkey, "Wine5c", REG_SZ, "Tabs and spaces", 16, 0); @@ -3466,7 +3466,7 @@ static void test_unicode_import_with_whitespace(void) "" Wine6a"="Leading spaces"\n" ""\t\tWine6b"="Leading tabs"\n" " " Wine6c " = " Spaces everywhere " \n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, " Wine6a", REG_SZ, "Leading spaces", 15, 0); verify_reg(hkey, "\t\tWine6b", REG_SZ, "Leading tabs", 13, 0); verify_reg(hkey, " Wine6c ", REG_SZ, " Spaces everywhere ", 22, 0); @@ -3475,7 +3475,7 @@ static void test_unicode_import_with_whitespace(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine7a"=" Four spaces in the data"\n" ""Wine7b"="\t\tTwo tabs in the data"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine7a", REG_SZ, " Four spaces in the data", 28, 0); verify_reg(hkey, "Wine7b", REG_SZ, "\t\tTwo tabs in the data", 23, 0);
@@ -3483,7 +3483,7 @@ static void test_unicode_import_with_whitespace(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine8a"="Trailing spaces" \n" ""Wine8b"="Trailing tabs and spaces"\t \t\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "Wine8a", REG_SZ, "Trailing spaces", 16, 0); verify_reg(hkey, "Wine8b", REG_SZ, "Trailing tabs and spaces", 25, 0);
@@ -3491,7 +3491,7 @@ static void test_unicode_import_with_whitespace(void) "[HKEY_CURRENT_USER\" KEY_BASE "]\n" ""Wine9a"=dword: 00000008\n" ""Wine9b"=dword:\t\t00000008\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); dword = 0x00000008; verify_reg(hkey, "Wine9a", REG_DWORD, &dword, sizeof(dword), 0); verify_reg(hkey, "Wine9b", REG_DWORD, &dword, sizeof(dword), 0); @@ -3499,13 +3499,13 @@ static void test_unicode_import_with_whitespace(void) test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "@ = "Test Value"\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "Test Value", 11, 0);
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n" "\t@\t=\tdword:\t00000008\t\n\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_DWORD, &dword, sizeof(DWORD), 0);
close_key(hkey); @@ -3529,49 +3529,49 @@ static void test_import_win31(void) /* Test simple value */ test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " = Value0\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); open_key(HKEY_CLASSES_ROOT, KEY_BASE, KEY_SET_VALUE, &hkey); verify_reg(hkey, "", REG_SZ, "Value0", 7, 0);
/* Test proper handling of spaces and equals signs */ test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " =Value1\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "Value1", 7, 0);
test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " = Value2\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, " Value2", 8, 0);
test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " = Value3 \r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "Value3 ", 8, 0);
test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " Value4\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "Value4", 7, 0);
test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " Value5\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "Value5", 7, 0);
test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE "\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "", 1, 0);
test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " \r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "", 1, 0);
test_import_str("REGEDIT\r\n" "HKEY_CLASSES_ROOT\" KEY_BASE " = No newline", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg(hkey, "", REG_SZ, "No newline", 11, 0);
delete_value(hkey, NULL); @@ -3579,43 +3579,43 @@ static void test_import_win31(void) /* Test character validity at the start of the line */ test_import_str("REGEDIT\r\n" " HKEY_CLASSES_ROOT\" KEY_BASE " = Value1a\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n" " HKEY_CLASSES_ROOT\" KEY_BASE " = Value1b\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n" "\tHKEY_CLASSES_ROOT\" KEY_BASE " = Value1c\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n" ";HKEY_CLASSES_ROOT\" KEY_BASE " = Value2a\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n" "#HKEY_CLASSES_ROOT\" KEY_BASE " = Value2b\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
/* Test case sensitivity */ test_import_str("REGEDIT\r\n" "hkey_classes_root\" KEY_BASE " = Value3a\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n" "hKEY_CLASSES_ROOT\" KEY_BASE " = Value3b\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
test_import_str("REGEDIT\r\n" "Hkey_Classes_Root\" KEY_BASE " = Value3c\r\n", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); verify_reg_nonexist(hkey, "");
close_key(hkey); @@ -3667,10 +3667,10 @@ static void test_registry_view_win32(void)
/* Try adding to the 32-bit registry view (32-bit Windows) */ run_reg_exe("reg import reg4.reg /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import reg5.reg /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey); verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); @@ -3690,10 +3690,10 @@ static void test_registry_view_win32(void)
/* Try adding to the 64-bit registry view, which doesn't exist on 32-bit Windows */ run_reg_exe("reg import reg4.reg /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import reg5.reg /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey); verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); @@ -3732,10 +3732,10 @@ static void test_registry_view_win64(void)
/* Try adding to the 32-bit registry view (64-bit Windows) */ run_reg_exe("reg import reg4.reg /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import reg5.reg /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey); verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); @@ -3756,10 +3756,10 @@ static void test_registry_view_win64(void)
/* Try adding to the 64-bit registry view (64-bit Windows) */ run_reg_exe("reg import reg4.reg /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import reg5.reg /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey); verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); @@ -3799,10 +3799,10 @@ static void test_registry_view_wow64(void)
/* Try adding to the 32-bit registry view (WOW64) */ run_reg_exe("reg import reg4.reg /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import reg5.reg /reg:32", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY, &hkey); verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); @@ -3823,10 +3823,10 @@ static void test_registry_view_wow64(void)
/* Try adding to the 64-bit registry view (WOW64) */ run_reg_exe("reg import reg4.reg /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg import reg5.reg /reg:64", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
open_key(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY, &hkey); verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); diff --git a/programs/reg/tests/query.c b/programs/reg/tests/query.c index a63b341546f..29c90af8c53 100644 --- a/programs/reg/tests/query.c +++ b/programs/reg/tests/query.c @@ -76,7 +76,7 @@ static BOOL read_reg_output_(const char *file, unsigned line, const char *cmd, TerminateProcess(pi.hProcess, 1);
bret = GetExitCodeProcess(pi.hProcess, rc); - lok(bret, "GetExitCodeProcess failed: %d\n", GetLastError()); + lok(bret, "GetExitCodeProcess failed: %ld\n", GetLastError());
CloseHandle(pipe_stdout_rd); CloseHandle(pi.hThread); @@ -110,38 +110,38 @@ static void test_command_syntax(void) DWORD r;
run_reg_exe("reg query", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg query /?", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg query /h", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg query -H", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg query HKCU\" KEY_BASE " /v", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg query HKCU\" KEY_BASE " /v Test1 /v Test2", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg query HKCU\" KEY_BASE " /v Test1 /ve", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg query HKCU\" KEY_BASE " /s /s", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* Test registry view */ run_reg_exe("reg query HKCU\" KEY_BASE " /reg:32 /reg:32", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg query HKCU\" KEY_BASE " /reg:32 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
run_reg_exe("reg query HKCU\" KEY_BASE " /reg:64 /reg:64", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r); }
static void test_query(void) @@ -207,7 +207,7 @@ static void test_query(void)
/* Key not present */ run_reg_exe("reg query HKCU\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
/* Create a test key */ add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey); @@ -215,22 +215,22 @@ static void test_query(void) add_value(hkey, "Test2", REG_DWORD, &dword, sizeof(dword));
run_reg_exe("reg query HKCU\" KEY_BASE " /v Missing", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
read_reg_output("reg query HKCU\" KEY_BASE, buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test1, FALSE, 0);
run_reg_exe("reg query HKCU\" KEY_BASE " /ve", &r); ok(r == REG_EXIT_SUCCESS || broken(r == REG_EXIT_FAILURE /* WinXP */), - "got exit code %d, expected 0\n", r); + "got exit code %ld, expected 0\n", r);
read_reg_output("reg query HKCU\" KEY_BASE " /v Test1", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test2, FALSE, 0);
run_reg_exe("reg query HKCU\" KEY_BASE " /v Test2", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
add_value(hkey, "Wine", REG_SZ, "First instance", 15);
@@ -238,7 +238,7 @@ static void test_query(void) add_key(hkey, "subkey", 0, &subkey);
read_reg_output("reg query HKCU\" KEY_BASE, buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test3, FALSE, 0);
add_value(subkey, "Test3", REG_SZ, "Some string data", 16); @@ -246,30 +246,30 @@ static void test_query(void) add_value(subkey, "Test4", REG_DWORD, &dword, sizeof(dword));
read_reg_output("reg query HKCU\" KEY_BASE "\subkey", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test4, FALSE, 0);
run_reg_exe("reg query HKCU\" KEY_BASE "\subkey /v Test3", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
read_reg_output("reg query HKCU\" KEY_BASE "\subkey /v Test4", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test5, FALSE, 0);
add_value(subkey, "Wine", REG_SZ, "Second instance", 16);
/* Test recursion */ read_reg_output("reg query HKCU\" KEY_BASE " /s", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test6, FALSE, 0);
read_reg_output("reg query HKCU\" KEY_BASE "\ /s", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test6, FALSE, 0);
read_reg_output("reg query HKCU\" KEY_BASE " /v Wine /s", buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS || r == REG_EXIT_FAILURE /* WinXP */, - "got exit code %d, expected 0\n", r); + "got exit code %ld, expected 0\n", r); compare_query(buf, test7, TRUE, 0);
add_value(hkey, NULL, REG_SZ, "Empty", 6); @@ -278,11 +278,11 @@ static void test_query(void) close_key(hkey);
run_reg_exe("reg query HKCU\" KEY_BASE "\subkey /ve", &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
run_reg_exe("reg query HKCU\" KEY_BASE " /ve /s", &r); ok(r == REG_EXIT_SUCCESS || r == REG_EXIT_FAILURE /* WinXP */, - "got exit code %d, expected 0\n", r); + "got exit code %ld, expected 0\n", r);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
@@ -295,11 +295,11 @@ static void test_query(void) close_key(hkey);
read_reg_output("reg query HKCU\" KEY_BASE, buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test8a, FALSE, 0);
read_reg_output("reg query HKCU\" KEY_BASE " /s", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test8b, FALSE, 0);
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0); @@ -366,15 +366,15 @@ static void test_registry_view_win32(void) create_test_key(KEY_WOW64_32KEY);
read_reg_output("reg query HKLM\" KEY_BASE " /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9a, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /s /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9c, TRUE, 0);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); @@ -383,15 +383,15 @@ static void test_registry_view_win32(void) create_test_key(KEY_WOW64_64KEY);
read_reg_output("reg query HKLM\" KEY_BASE " /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9a, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /s /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9c, TRUE, 0);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); @@ -414,15 +414,15 @@ static void test_registry_view_win64(void) create_test_key(KEY_WOW64_32KEY);
read_reg_output("reg query HKLM\" KEY_BASE " /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9a, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /s /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9c, TRUE, 0);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); @@ -432,15 +432,15 @@ static void test_registry_view_win64(void) create_test_key(KEY_WOW64_64KEY);
read_reg_output("reg query HKLM\" KEY_BASE " /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9a, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /s /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9c, TRUE, 0);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); @@ -462,15 +462,15 @@ static void test_registry_view_wow64(void) create_test_key(KEY_WOW64_32KEY);
read_reg_output("reg query HKLM\" KEY_BASE " /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9a, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /s /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:32", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9c, TRUE, 0);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); @@ -480,15 +480,15 @@ static void test_registry_view_wow64(void) create_test_key(KEY_WOW64_64KEY);
read_reg_output("reg query HKLM\" KEY_BASE " /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9a, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /s /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:64", buf, sizeof(buf), &r); - ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r); compare_query(buf, test9c, TRUE, 0);
delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/schtasks/tests/Makefile.in | 1 - programs/schtasks/tests/schtasks.c | 42 ++++++++++++++++++----------------- 2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/programs/schtasks/tests/Makefile.in b/programs/schtasks/tests/Makefile.in index 23cb744ff15..dcf641c4b13 100644 --- a/programs/schtasks/tests/Makefile.in +++ b/programs/schtasks/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = schtasks.exe IMPORTS = ole32
diff --git a/programs/schtasks/tests/schtasks.c b/programs/schtasks/tests/schtasks.c index c0f4ce78365..c1168d4b209 100644 --- a/programs/schtasks/tests/schtasks.c +++ b/programs/schtasks/tests/schtasks.c @@ -74,7 +74,7 @@ static DWORD _run_command(unsigned line, const char *cmd)
strcpy(command, cmd); r = CreateProcessA(NULL, command, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi); - ok_(__FILE__,line)(r, "CreateProcess failed: %u\n", GetLastError()); + ok_(__FILE__,line)(r, "CreateProcess failed: %lu\n", GetLastError()); if(!r) return -1;
ret = WaitForSingleObject(pi.hProcess, 10000); @@ -83,7 +83,7 @@ static DWORD _run_command(unsigned line, const char *cmd) TerminateProcess(pi.hProcess, -1);
r = GetExitCodeProcess(pi.hProcess, &ret); - ok_(__FILE__,line)(r, "GetExitCodeProcess failed: %u\n", GetLastError()); + ok_(__FILE__,line)(r, "GetExitCodeProcess failed: %lu\n", GetLastError());
CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -107,7 +107,7 @@ static void _register_task(unsigned line, const char *task_name_a)
hres = ITaskFolder_RegisterTask(root, task_name, xml, TASK_CREATE, empty, empty, TASK_LOGON_NONE, empty, &task); - ok_(__FILE__,line)(hres == S_OK, "RegisterTask failed: %08x\n", hres); + ok_(__FILE__,line)(hres == S_OK, "RegisterTask failed: %08lx\n", hres); HeapFree(GetProcessHeap(), 0, task_name); HeapFree(GetProcessHeap(), 0, xml);
@@ -123,7 +123,7 @@ static void _unregister_task(unsigned line, const char *task_name_a) task_name = a2w(task_name_a);
hres = ITaskFolder_DeleteTask(root, task_name, 0); - ok_(__FILE__,line)(hres == S_OK, "DeleteTask failed: %08x\n", hres); + ok_(__FILE__,line)(hres == S_OK, "DeleteTask failed: %08lx\n", hres);
HeapFree(GetProcessHeap(), 0, task_name); } @@ -141,7 +141,7 @@ static void create_file(const char *file_name, const char *data) return;
r = WriteFile(file, data, strlen(data), &size, NULL); - ok(r, "WriteFile failed: %u\n", GetLastError()); + ok(r, "WriteFile failed: %lu\n", GetLastError()); CloseHandle(file); }
@@ -153,17 +153,17 @@ static BOOL initialize_task_service(void) hres = CoCreateInstance(&CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskService, (void **)&service); if(hres != S_OK) { - ok(hres == REGDB_E_CLASSNOTREG, "Could not create task service: %08x\n", hres); + ok(hres == REGDB_E_CLASSNOTREG, "Could not create task service: %08lx\n", hres); win_skip("Task service not available\n"); return FALSE; }
V_VT(&empty) = VT_EMPTY; hres = ITaskService_Connect(service, empty, empty, empty, empty); - ok(hres == S_OK, "Connect failed: %08x\n", hres); + ok(hres == S_OK, "Connect failed: %08lx\n", hres);
hres = ITaskService_GetFolder(service, NULL, &root); - ok(hres == S_OK, "GetFolder error %08x\n", hres); + ok(hres == S_OK, "GetFolder error %08lx\n", hres); return TRUE; }
@@ -180,51 +180,51 @@ START_TEST(schtasks) }
r = run_command("schtasks"); - ok(r == 0, "r = %u\n", r); + ok(r == 0, "r = %lu\n", r);
register_task("winetest");
r = run_command("schtasks /change /tn winetest /enable"); - ok(r == 0, "r = %u\n", r); + ok(r == 0, "r = %lu\n", r);
unregister_task("winetest");
r = run_command("schtasks /change /tn winetest /enable"); - ok(r == 1, "r = %u\n", r); + ok(r == 1, "r = %lu\n", r);
register_task("wine\test\winetest");
r = run_command("schtasks /CHANGE /tn wine\test\winetest /enable"); - ok(r == 0, "r = %u\n", r); + ok(r == 0, "r = %lu\n", r);
r = run_command("schtasks /delete /f /tn wine\test\winetest"); - ok(r == 0, "r = %u\n", r); + ok(r == 0, "r = %lu\n", r);
r = run_command("schtasks /Change /tn wine\test\winetest /enable"); - ok(r == 1, "r = %u\n", r); + ok(r == 1, "r = %lu\n", r);
create_file("test.xml", xml_a);
r = run_command("schtasks /create /xml test.xml /tn wine\winetest"); - ok(r == 0, "r = %u\n", r); + ok(r == 0, "r = %lu\n", r);
r = run_command("schtasks /change /tn wine\winetest /enable"); - ok(r == 0, "r = %u\n", r); + ok(r == 0, "r = %lu\n", r);
r = run_command("schtasks /create /xml test.xml /f /tn wine\winetest"); - ok(r == 0, "r = %u\n", r); /* task already exists, but /f argument provided */ + ok(r == 0, "r = %lu\n", r); /* task already exists, but /f argument provided */
r = run_command("schtasks /create /xml test.xml /tn wine\winetest"); - ok(r == 1, "r = %u\n", r); /* task already exists */ + ok(r == 1, "r = %lu\n", r); /* task already exists */
r = run_command("schtasks /create /tn wine\winetest"); - ok(r == E_FAIL, "r = %x\n", r); /* missing arguments */ + ok(r == E_FAIL, "r = %lx\n", r); /* missing arguments */
r = run_command("schtasks /Delete /f /tn wine\winetest"); - ok(r == 0, "r = %u\n", r); + ok(r == 0, "r = %lu\n", r);
r = DeleteFileA("test.xml"); - ok(r, "DeleteFileA failed: %u\n", GetLastError()); + ok(r, "DeleteFileA failed: %lu\n", GetLastError());
ITaskFolder_DeleteFolder(root, wine_testW, 0); ITaskFolder_DeleteFolder(root, wineW, 0);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/services/tests/Makefile.in | 1 programs/services/tests/service.c | 150 ++++++++++++++++++----------------- 2 files changed, 75 insertions(+), 76 deletions(-)
diff --git a/programs/services/tests/Makefile.in b/programs/services/tests/Makefile.in index efa8bd754cc..3abec747653 100644 --- a/programs/services/tests/Makefile.in +++ b/programs/services/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = services.exe IMPORTS = user32 advapi32
diff --git a/programs/services/tests/service.c b/programs/services/tests/service.c index 7495232b7b1..f069347ff37 100644 --- a/programs/services/tests/service.c +++ b/programs/services/tests/service.c @@ -85,8 +85,8 @@ static void test_winstation(void) service_ok(winstation != NULL, "winstation = NULL\n");
r = GetUserObjectInformationA(winstation, UOI_FLAGS, &flags, sizeof(flags), NULL); - service_ok(r, "GetUserObjectInformation(UOI_NAME) failed: %u\n", GetLastError()); - service_ok(!(flags.dwFlags & WSF_VISIBLE), "winstation has flags %x\n", flags.dwFlags); + service_ok(r, "GetUserObjectInformation(UOI_NAME) failed: %lu\n", GetLastError()); + service_ok(!(flags.dwFlags & WSF_VISIBLE), "winstation has flags %lx\n", flags.dwFlags); }
/* @@ -118,22 +118,22 @@ static void test_create_window(void) hwnd = CreateWindowA("service_test", "service_test", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 515, 530, NULL, NULL, NULL, NULL); - service_ok(hwnd != NULL, "CreateWindow failed: %u\n", GetLastError()); + service_ok(hwnd != NULL, "CreateWindow failed: %lu\n", GetLastError());
style = GetWindowLongW(hwnd, GWL_STYLE); - service_ok(!(style & WS_VISIBLE), "style = %x, expected invisible\n", style); + service_ok(!(style & WS_VISIBLE), "style = %lx, expected invisible\n", style);
r = ShowWindow(hwnd, SW_SHOW); service_ok(!r, "ShowWindow returned %x\n", r);
style = GetWindowLongW(hwnd, GWL_STYLE); - service_ok(style & WS_VISIBLE, "style = %x, expected visible\n", style); + service_ok(style & WS_VISIBLE, "style = %lx, expected visible\n", style);
r = ShowWindow(hwnd, SW_SHOW); service_ok(r, "ShowWindow returned %x\n", r);
r = DestroyWindow(hwnd); - service_ok(r, "DestroyWindow failed: %08x\n", GetLastError()); + service_ok(r, "DestroyWindow failed: %08lx\n", GetLastError()); }
static BOOL CALLBACK monitor_enum_proc(HMONITOR hmon, HDC hdc, LPRECT lprc, LPARAM lparam) @@ -150,7 +150,7 @@ static BOOL CALLBACK monitor_enum_proc(HMONITOR hmon, HDC hdc, LPRECT lprc, LPAR
SetLastError(0xdeadbeef); r = GetMonitorInfoA(NULL, (MONITORINFO*)&mi); - service_ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Unexpected GetLastError: %#x.\n", GetLastError()); + service_ok(GetLastError() == ERROR_INVALID_MONITOR_HANDLE, "Unexpected GetLastError: %#lx.\n", GetLastError()); service_ok(!r, "GetMonitorInfo with NULL HMONITOR succeeded.\n");
r = GetMonitorInfoA(hmon, (MONITORINFO*)&mi); @@ -218,7 +218,7 @@ static void WINAPI service_main(DWORD argc, char **argv) char buf[64]; BOOL res;
- service_ok(argc == 3, "argc = %u, expected 3\n", argc); + service_ok(argc == 3, "argc = %lu, expected 3\n", argc); service_ok(!strcmp(argv[0], service_name), "argv[0] = '%s', expected '%s'\n", argv[0], service_name); service_ok(!strcmp(argv[1], "param1"), "argv[1] = '%s', expected 'param1'\n", argv[1]); service_ok(!strcmp(argv[2], "param2"), "argv[2] = '%s', expected 'param2'\n", argv[2]); @@ -228,7 +228,7 @@ static void WINAPI service_main(DWORD argc, char **argv) service_ok(buf[0], "did not find PATHEXT environment variable\n");
service_handle = pRegisterServiceCtrlHandlerExA(service_name, service_handler, NULL); - service_ok(service_handle != NULL, "RegisterServiceCtrlHandlerEx failed: %u\n", GetLastError()); + service_ok(service_handle != NULL, "RegisterServiceCtrlHandlerEx failed: %lu\n", GetLastError()); if(!service_handle) return;
@@ -240,7 +240,7 @@ static void WINAPI service_main(DWORD argc, char **argv) status.dwCheckPoint = 0; status.dwWaitHint = 10000; res = SetServiceStatus(service_handle, &status); - service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %u\n", GetLastError()); + service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %lu\n", GetLastError());
service_event("RUNNING");
@@ -249,7 +249,7 @@ static void WINAPI service_main(DWORD argc, char **argv) status.dwCurrentState = SERVICE_STOPPED; status.dwControlsAccepted = 0; res = SetServiceStatus(service_handle, &status); - service_ok(res, "SetServiceStatus(SERVICE_STOPPED) failed: %u\n", GetLastError()); + service_ok(res, "SetServiceStatus(SERVICE_STOPPED) failed: %lu\n", GetLastError()); }
static void service_process(void (WINAPI *p_service_main)(DWORD, char **)) @@ -272,12 +272,12 @@ static void service_process(void (WINAPI *p_service_main)(DWORD, char **)) service_trace("Starting...\n");
service_stop_event = CreateEventA(NULL, TRUE, FALSE, NULL); - service_ok(service_stop_event != NULL, "Could not create event: %u\n", GetLastError()); + service_ok(service_stop_event != NULL, "Could not create event: %lu\n", GetLastError()); if(!service_stop_event) return;
res = StartServiceCtrlDispatcherA(servtbl); - service_ok(res, "StartServiceCtrlDispatcher failed: %u\n", GetLastError()); + service_ok(res, "StartServiceCtrlDispatcher failed: %lu\n", GetLastError());
/* Let service thread terminate */ Sleep(50); @@ -319,11 +319,11 @@ static void WINAPI no_stop_main(DWORD argc, char **argv) SERVICE_STATUS status; BOOL res;
- service_ok(argc == 1, "argc = %u, expected 1\n", argc); + service_ok(argc == 1, "argc = %lu, expected 1\n", argc); service_ok(!strcmp(argv[0], service_name), "argv[0] = '%s', expected '%s'\n", argv[0], service_name);
service_handle = pRegisterServiceCtrlHandlerExA(service_name, no_stop_handler, NULL); - service_ok(service_handle != NULL, "RegisterServiceCtrlHandlerEx failed: %u\n", GetLastError()); + service_ok(service_handle != NULL, "RegisterServiceCtrlHandlerEx failed: %lu\n", GetLastError()); if(!service_handle) return;
@@ -335,7 +335,7 @@ static void WINAPI no_stop_main(DWORD argc, char **argv) status.dwCheckPoint = 0; status.dwWaitHint = 10000; res = SetServiceStatus(service_handle, &status); - service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %u\n", GetLastError()); + service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %lu\n", GetLastError());
service_event("RUNNING"); } @@ -376,7 +376,7 @@ static SC_HANDLE register_service(const char *test_name) return NULL; }
- ok(service != NULL, "CreateService failed: %u\n", GetLastError()); + ok(service != NULL, "CreateService failed: %lu\n", GetLastError()); return service; }
@@ -388,7 +388,7 @@ static void expect_event(const char *event_name) trace("waiting for %s\n", event_name);
res = WaitForSingleObject(event_handle, 30000); - ok(res == WAIT_OBJECT_0, "WaitForSingleObject failed: %u\n", res); + ok(res == WAIT_OBJECT_0, "WaitForSingleObject failed: %lu\n", res); if(res != WAIT_OBJECT_0) return;
@@ -407,13 +407,13 @@ static DWORD WINAPI pipe_thread(void *arg) BOOL res;
res = ConnectNamedPipe(pipe_handle, NULL); - ok(res || GetLastError() == ERROR_PIPE_CONNECTED, "ConnectNamedPipe failed: %u\n", GetLastError()); + ok(res || GetLastError() == ERROR_PIPE_CONNECTED, "ConnectNamedPipe failed: %lu\n", GetLastError());
while(1) { res = ReadFile(pipe_handle, buf, sizeof(buf), &read, NULL); if(!res) { ok(GetLastError() == ERROR_BROKEN_PIPE || GetLastError() == ERROR_INVALID_HANDLE, - "ReadFile failed: %u\n", GetLastError()); + "ReadFile failed: %lu\n", GetLastError()); break; }
@@ -456,7 +456,7 @@ static void test_service(void)
trace("starting...\n"); res = StartServiceA(service_handle, 2, argv); - ok(res, "StartService failed: %u\n", GetLastError()); + ok(res, "StartService failed: %lu\n", GetLastError()); if(!res) { DeleteService(service_handle); CloseServiceHandle(service_handle); @@ -465,32 +465,32 @@ static void test_service(void) expect_event("RUNNING");
res = QueryServiceStatus(service_handle, &status); - ok(res, "QueryServiceStatus failed: %d\n", GetLastError()); - ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %x\n", status.dwServiceType); - ok(status.dwCurrentState == SERVICE_RUNNING, "status.dwCurrentState = %x\n", status.dwCurrentState); + ok(res, "QueryServiceStatus failed: %ld\n", GetLastError()); + ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %lx\n", status.dwServiceType); + ok(status.dwCurrentState == SERVICE_RUNNING, "status.dwCurrentState = %lx\n", status.dwCurrentState); ok(status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN), - "status.dwControlsAccepted = %x\n", status.dwControlsAccepted); - ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %d\n", status.dwWin32ExitCode); - ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %d\n", + "status.dwControlsAccepted = %lx\n", status.dwControlsAccepted); + ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %ld\n", status.dwWin32ExitCode); + ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %ld\n", status.dwServiceSpecificExitCode); - ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %d\n", status.dwCheckPoint); - todo_wine ok(status.dwWaitHint == 0, "status.dwWaitHint = %d\n", status.dwWaitHint); + ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %ld\n", status.dwCheckPoint); + todo_wine ok(status.dwWaitHint == 0, "status.dwWaitHint = %ld\n", status.dwWaitHint);
res = QueryServiceStatusEx(service_handle, SC_STATUS_PROCESS_INFO, (BYTE *)&status2, sizeof(status2), &bytes); - ok(res, "QueryServiceStatusEx failed: %u\n", GetLastError()); - ok(status2.dwCurrentState == SERVICE_RUNNING, "status2.dwCurrentState = %x\n", status2.dwCurrentState); - ok(status2.dwProcessId != 0, "status2.dwProcessId = %d\n", status2.dwProcessId); + ok(res, "QueryServiceStatusEx failed: %lu\n", GetLastError()); + ok(status2.dwCurrentState == SERVICE_RUNNING, "status2.dwCurrentState = %lx\n", status2.dwCurrentState); + ok(status2.dwProcessId != 0, "status2.dwProcessId = %ld\n", status2.dwProcessId);
res = ControlService(service_handle, 128, &status); - ok(res, "ControlService failed: %u\n", GetLastError()); + ok(res, "ControlService failed: %lu\n", GetLastError()); expect_event("CUSTOM");
res = ControlService(service_handle, SERVICE_CONTROL_STOP, &status); - ok(res, "ControlService failed: %u\n", GetLastError()); + ok(res, "ControlService failed: %lu\n", GetLastError()); expect_event("STOP");
res = DeleteService(service_handle); - ok(res, "DeleteService failed: %u\n", GetLastError()); + ok(res, "DeleteService failed: %lu\n", GetLastError());
CloseServiceHandle(service_handle); } @@ -508,7 +508,7 @@ static inline void test_no_stop(void)
trace("starting...\n"); res = StartServiceA(service_handle, 0, NULL); - ok(res, "StartService failed: %u\n", GetLastError()); + ok(res, "StartService failed: %lu\n", GetLastError()); if(!res) { DeleteService(service_handle); CloseServiceHandle(service_handle); @@ -520,91 +520,91 @@ static inline void test_no_stop(void) Sleep(1000);
res = QueryServiceStatus(service_handle, &status); - ok(res, "QueryServiceStatus failed: %d\n", GetLastError()); - ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %x\n", status.dwServiceType); - ok(status.dwCurrentState == SERVICE_RUNNING, "status.dwCurrentState = %x\n", status.dwCurrentState); + ok(res, "QueryServiceStatus failed: %ld\n", GetLastError()); + ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %lx\n", status.dwServiceType); + ok(status.dwCurrentState == SERVICE_RUNNING, "status.dwCurrentState = %lx\n", status.dwCurrentState); ok(status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN), - "status.dwControlsAccepted = %x\n", status.dwControlsAccepted); - ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %d\n", status.dwWin32ExitCode); - ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %d\n", + "status.dwControlsAccepted = %lx\n", status.dwControlsAccepted); + ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %ld\n", status.dwWin32ExitCode); + ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %ld\n", status.dwServiceSpecificExitCode); - ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %d\n", status.dwCheckPoint); - todo_wine ok(status.dwWaitHint == 0, "status.dwWaitHint = %d\n", status.dwWaitHint); + ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %ld\n", status.dwCheckPoint); + todo_wine ok(status.dwWaitHint == 0, "status.dwWaitHint = %ld\n", status.dwWaitHint);
res = QueryServiceStatusEx(service_handle, SC_STATUS_PROCESS_INFO, (BYTE *)&status2, sizeof(status2), &bytes); - ok(res, "QueryServiceStatusEx failed: %u\n", GetLastError()); - ok(status2.dwCurrentState == SERVICE_RUNNING, "status2.dwCurrentState = %x\n", status2.dwCurrentState); - ok(status2.dwProcessId != 0, "status2.dwProcessId = %d\n", status2.dwProcessId); + ok(res, "QueryServiceStatusEx failed: %lu\n", GetLastError()); + ok(status2.dwCurrentState == SERVICE_RUNNING, "status2.dwCurrentState = %lx\n", status2.dwCurrentState); + ok(status2.dwProcessId != 0, "status2.dwProcessId = %ld\n", status2.dwProcessId);
res = ControlService(service_handle, SERVICE_CONTROL_STOP, &status); - ok(res, "ControlService failed: %u\n", GetLastError()); + ok(res, "ControlService failed: %lu\n", GetLastError()); expect_event("STOP");
res = QueryServiceStatus(service_handle, &status); - ok(res, "QueryServiceStatus failed: %d\n", GetLastError()); - ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %x\n", status.dwServiceType); + ok(res, "QueryServiceStatus failed: %ld\n", GetLastError()); + ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %lx\n", status.dwServiceType); ok(status.dwCurrentState==SERVICE_STOPPED || status.dwCurrentState==SERVICE_STOP_PENDING, - "status.dwCurrentState = %x\n", status.dwCurrentState); - ok(status.dwControlsAccepted == 0, "status.dwControlsAccepted = %x\n", status.dwControlsAccepted); - ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %d\n", status.dwWin32ExitCode); - ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %d\n", + "status.dwCurrentState = %lx\n", status.dwCurrentState); + ok(status.dwControlsAccepted == 0, "status.dwControlsAccepted = %lx\n", status.dwControlsAccepted); + ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %ld\n", status.dwWin32ExitCode); + ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %ld\n", status.dwServiceSpecificExitCode); - ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %d\n", status.dwCheckPoint); - ok(status.dwWaitHint == 0, "status.dwWaitHint = %d\n", status.dwWaitHint); + ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %ld\n", status.dwCheckPoint); + ok(status.dwWaitHint == 0, "status.dwWaitHint = %ld\n", status.dwWaitHint);
res = QueryServiceStatusEx(service_handle, SC_STATUS_PROCESS_INFO, (BYTE *)&status2, sizeof(status2), &bytes); - ok(res, "QueryServiceStatusEx failed: %u\n", GetLastError()); + ok(res, "QueryServiceStatusEx failed: %lu\n", GetLastError()); ok(status2.dwProcessId == 0 || broken(status2.dwProcessId != 0), - "status2.dwProcessId = %d\n", status2.dwProcessId); + "status2.dwProcessId = %ld\n", status2.dwProcessId);
res = DeleteService(service_handle); - ok(res, "DeleteService failed: %u\n", GetLastError()); + ok(res, "DeleteService failed: %lu\n", GetLastError());
res = QueryServiceStatus(service_handle, &status); - ok(res, "QueryServiceStatus failed: %d\n", GetLastError()); - ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %x\n", status.dwServiceType); + ok(res, "QueryServiceStatus failed: %ld\n", GetLastError()); + ok(status.dwServiceType == SERVICE_WIN32_OWN_PROCESS, "status.dwServiceType = %lx\n", status.dwServiceType); ok(status.dwCurrentState==SERVICE_STOPPED || status.dwCurrentState==SERVICE_STOP_PENDING, - "status.dwCurrentState = %x\n", status.dwCurrentState); - ok(status.dwControlsAccepted == 0, "status.dwControlsAccepted = %x\n", status.dwControlsAccepted); - ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %d\n", status.dwWin32ExitCode); - ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %d\n", + "status.dwCurrentState = %lx\n", status.dwCurrentState); + ok(status.dwControlsAccepted == 0, "status.dwControlsAccepted = %lx\n", status.dwControlsAccepted); + ok(status.dwWin32ExitCode == 0, "status.dwExitCode = %ld\n", status.dwWin32ExitCode); + ok(status.dwServiceSpecificExitCode == 0, "status.dwServiceSpecificExitCode = %ld\n", status.dwServiceSpecificExitCode); - ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %d\n", status.dwCheckPoint); - ok(status.dwWaitHint == 0, "status.dwWaitHint = %d\n", status.dwWaitHint); + ok(status.dwCheckPoint == 0, "status.dwCheckPoint = %ld\n", status.dwCheckPoint); + ok(status.dwWaitHint == 0, "status.dwWaitHint = %ld\n", status.dwWaitHint);
res = QueryServiceStatusEx(service_handle, SC_STATUS_PROCESS_INFO, (BYTE *)&status2, sizeof(status2), &bytes); - ok(res, "QueryServiceStatusEx failed: %u\n", GetLastError()); + ok(res, "QueryServiceStatusEx failed: %lu\n", GetLastError()); ok(status2.dwProcessId == 0 || broken(status2.dwProcessId != 0), - "status2.dwProcessId = %d\n", status2.dwProcessId); + "status2.dwProcessId = %ld\n", status2.dwProcessId);
CloseServiceHandle(service_handle);
res = QueryServiceStatus(service_handle, &status); ok(!res, "QueryServiceStatus should have failed\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError = %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError = %ld\n", GetLastError()); }
static void test_runner(void (*p_run_test)(void)) { HANDLE thread;
- sprintf(service_name, "WineTestService%d", GetTickCount()); + sprintf(service_name, "WineTestService%ld", GetTickCount()); trace("service_name: %s\n", service_name); sprintf(named_pipe_name, "\\.\pipe\%s_pipe", service_name);
pipe_handle = CreateNamedPipeA(named_pipe_name, PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, 10, 2048, 2048, 10000, NULL); - ok(pipe_handle != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %u\n", GetLastError()); + ok(pipe_handle != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %lu\n", GetLastError()); if(pipe_handle == INVALID_HANDLE_VALUE) return;
event_handle = CreateEventA(NULL, FALSE, FALSE, NULL); - ok(event_handle != INVALID_HANDLE_VALUE, "CreateEvent failed: %u\n", GetLastError()); + ok(event_handle != INVALID_HANDLE_VALUE, "CreateEvent failed: %lu\n", GetLastError()); if(event_handle == INVALID_HANDLE_VALUE) return;
thread = CreateThread(NULL, 0, pipe_thread, NULL, 0, NULL); - ok(thread != NULL, "CreateThread failed: %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed: %lu\n", GetLastError()); if(!thread) return;
@@ -630,7 +630,7 @@ START_TEST(service) }
scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - ok(scm_handle != NULL || GetLastError() == ERROR_ACCESS_DENIED, "OpenSCManager failed: %u\n", GetLastError()); + ok(scm_handle != NULL || GetLastError() == ERROR_ACCESS_DENIED, "OpenSCManager failed: %lu\n", GetLastError()); if(!scm_handle) { skip("OpenSCManager failed, skipping tests\n"); return;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/wscript/tests/Makefile.in | 1 - programs/wscript/tests/run.c | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/programs/wscript/tests/Makefile.in b/programs/wscript/tests/Makefile.in index bdb231353b7..1f038b04588 100644 --- a/programs/wscript/tests/Makefile.in +++ b/programs/wscript/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = wscript.exe IMPORTS = ole32 oleaut32 psapi advapi32
diff --git a/programs/wscript/tests/run.c b/programs/wscript/tests/run.c index dbd10f537a7..7bccf097f87 100644 --- a/programs/wscript/tests/run.c +++ b/programs/wscript/tests/run.c @@ -260,7 +260,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF break; } default: - ok(0, "unexpected dispIdMember %d\n", dispIdMember); + ok(0, "unexpected dispIdMember %ld\n", dispIdMember); return E_NOTIMPL; }
@@ -345,8 +345,8 @@ static void run_script_file(const char *file_name, DWORD expected_exit_code) WaitForSingleObject(pi.hProcess, INFINITE);
bres = GetExitCodeProcess(pi.hProcess, &exit_code); - ok(bres, "GetExitCodeProcess failed: %u\n", GetLastError()); - ok(exit_code == expected_exit_code, "exit_code = %u, expected %u\n", exit_code, expected_exit_code); + ok(bres, "GetExitCodeProcess failed: %lu\n", GetLastError()); + ok(exit_code == expected_exit_code, "exit_code = %lu, expected %lu\n", exit_code, expected_exit_code);
CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -371,13 +371,13 @@ static void run_script(const char *name, const char *script_data, size_t script_
file = CreateFileA(file_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError()); if(file == INVALID_HANDLE_VALUE) return;
res = WriteFile(file, script_data, script_size, &size, NULL); CloseHandle(file); - ok(res, "Could not write to file: %u\n", GetLastError()); + ok(res, "Could not write to file: %lu\n", GetLastError()); if(!res) return;
@@ -400,7 +400,7 @@ static BOOL WINAPI test_enum_proc(HMODULE module, LPCSTR type, LPSTR name, LONG_ trace("running %s test...\n", name);
src = FindResourceA(NULL, name, type); - ok(src != NULL, "Could not find resource %s: %u\n", name, GetLastError()); + ok(src != NULL, "Could not find resource %s: %lu\n", name, GetLastError()); if(!src) return TRUE;
@@ -451,7 +451,7 @@ static BOOL register_activex(void)
hres = CoRegisterClassObject(&CLSID_TestObj, (IUnknown *)&testobj_cf, CLSCTX_SERVER, REGCLS_MULTIPLEUSE, ®id); - ok(hres == S_OK, "Could not register script engine: %08x\n", hres); + ok(hres == S_OK, "Could not register script engine: %08lx\n", hres); return TRUE; }
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/xcopy/tests/Makefile.in | 1 - programs/xcopy/tests/xcopy.c | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/programs/xcopy/tests/Makefile.in b/programs/xcopy/tests/Makefile.in index 5fb76fe2d20..3b3d5d5bdc5 100644 --- a/programs/xcopy/tests/Makefile.in +++ b/programs/xcopy/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = xcopy.exe
C_SRCS = \ diff --git a/programs/xcopy/tests/xcopy.c b/programs/xcopy/tests/xcopy.c index 17b4406b74c..fa3d5328a1b 100644 --- a/programs/xcopy/tests/xcopy.c +++ b/programs/xcopy/tests/xcopy.c @@ -56,18 +56,18 @@ static void test_date_format(void) DWORD rc;
rc = runcmd("xcopy /D:20-01-2000 xcopy1 xcopytest"); - ok(rc == 4, "xcopy /D:d-m-y test returned rc=%u\n", rc); + ok(rc == 4, "xcopy /D:d-m-y test returned rc=%lu\n", rc); ok(GetFileAttributesA("xcopytest\xcopy1") == INVALID_FILE_ATTRIBUTES, "xcopy should not have created xcopytest\xcopy1\n");
rc = runcmd("xcopy /D:01-20-2000 xcopy1 xcopytest"); - ok(rc == 0, "xcopy /D:m-d-y test failed rc=%u\n", rc); + ok(rc == 0, "xcopy /D:m-d-y test failed rc=%lu\n", rc); ok(GetFileAttributesA("xcopytest\xcopy1") != INVALID_FILE_ATTRIBUTES, "xcopy did not create xcopytest\xcopy1\n"); DeleteFileA("xcopytest\xcopy1");
rc = runcmd("xcopy /D:1-20-2000 xcopy1 xcopytest"); - ok(rc == 0, "xcopy /D:m-d-y test failed rc=%u\n", rc); + ok(rc == 0, "xcopy /D:m-d-y test failed rc=%lu\n", rc); ok(GetFileAttributesA("xcopytest\xcopy1") != INVALID_FILE_ATTRIBUTES, "xcopy did not create xcopytest\xcopy1\n"); DeleteFileA("xcopytest\xcopy1"); @@ -78,12 +78,12 @@ static void test_parms_syntax(void) DWORD rc;
rc = runcmd("xcopy /H/D:20-01-2000 xcopy1 xcopytest"); - ok(rc == 4, "xcopy /H/D:d-m-y test returned rc=%u\n", rc); + ok(rc == 4, "xcopy /H/D:d-m-y test returned rc=%lu\n", rc); ok(GetFileAttributesA("xcopytest\xcopy1") == INVALID_FILE_ATTRIBUTES, "xcopy should not have created xcopytest\xcopy1\n");
rc = runcmd("xcopy /D:01-20-2000/H xcopy1 xcopytest"); - ok(rc == 0, "xcopy /H/D:m-d-y test failed rc=%u\n", rc); + ok(rc == 0, "xcopy /H/D:m-d-y test failed rc=%lu\n", rc); ok(GetFileAttributesA("xcopytest\xcopy1") != INVALID_FILE_ATTRIBUTES, "xcopy did not create xcopytest\xcopy1\n"); DeleteFileA("xcopytest\xcopy1"); @@ -97,12 +97,12 @@ static void test_parms_syntax(void) DeleteFileA("xcopytest\xcopy1"); */
rc = runcmd("xcopy /D/S xcopytest xcopytest2\"); - ok(rc == 0, "xcopy /D/S test failed rc=%u\n", rc); + ok(rc == 0, "xcopy /D/S test failed rc=%lu\n", rc); ok(GetFileAttributesA("xcopytest2") == INVALID_FILE_ATTRIBUTES, "xcopy copied empty directory incorrectly\n");
rc = runcmd("xcopy /D/S/E xcopytest xcopytest2\"); - ok(rc == 0, "xcopy /D/S/E test failed rc=%u\n", rc); + ok(rc == 0, "xcopy /D/S/E test failed rc=%lu\n", rc); ok(GetFileAttributesA("xcopytest2") != INVALID_FILE_ATTRIBUTES, "xcopy failed to copy empty directory\n"); RemoveDirectoryA("xcopytest2");