Module: wine Branch: master Commit: c9b4210b9ca9394d76511af36eb61e89c366e009 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c9b4210b9ca9394d76511af36e...
Author: Alexandre Julliard julliard@winehq.org Date: Sun Jan 4 14:12:14 2009 +0100
kernel32/tests: Use the actual name of the exe module in toolhelp tests.
---
dlls/kernel32/tests/toolhelp.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/toolhelp.c b/dlls/kernel32/tests/toolhelp.c index 109df6e..529df88 100644 --- a/dlls/kernel32/tests/toolhelp.c +++ b/dlls/kernel32/tests/toolhelp.c @@ -204,14 +204,14 @@ static void test_thread(DWORD curr_pid, DWORD sub_pcs_pid)
static const char* curr_expected_modules[] = { - "kernel32.dll", "kernel32_test.exe" + "kernel32.dll", /* FIXME: could test for ntdll on NT and Wine */ }; static const char* sub_expected_modules[] = { - "kernel32.dll", "kernel32_test.exe", + "kernel32.dll", "shell32.dll" /* FIXME: could test for ntdll on NT and Wine */ }; @@ -283,6 +283,7 @@ START_TEST(toolhelp) { DWORD pid = GetCurrentProcessId(); int r; + char *p, module[MAX_PATH]; char buffer[MAX_PATH]; SECURITY_ATTRIBUTES sa; PROCESS_INFORMATION info; @@ -330,6 +331,12 @@ START_TEST(toolhelp) w = WaitForSingleObject(ev1, WAIT_TIME); ok(w == WAIT_OBJECT_0, "Failed to wait on sub-process startup\n");
+ GetModuleFileNameA( 0, module, sizeof(module) ); + if (!(p = strrchr( module, '\' ))) p = module; + else p++; + curr_expected_modules[0] = p; + sub_expected_modules[0] = p; + test_process(pid, info.dwProcessId); test_thread(pid, info.dwProcessId); test_module(pid, curr_expected_modules, NUM_OF(curr_expected_modules));