Module: wine Branch: master Commit: e091c12b669e7013aabcca301a586255e445d8d6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e091c12b669e7013aabcca301a...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jun 8 11:50:20 2010 +0200
kernel32/tests: Fix the process title tests to actually test something.
---
dlls/kernel32/tests/process.c | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 065a94a..77293c6 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -527,6 +527,7 @@ static void test_Startup(void) char buffer[MAX_PATH]; PROCESS_INFORMATION info; STARTUPINFOA startup,si; + char *result; static CHAR title[] = "I'm the title string", desktop[] = "winsta0\default", empty[] = ""; @@ -699,8 +700,9 @@ static void test_Startup(void)
okChildInt("StartupInfoA", "cb", startup.cb); okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop); - ok (startup.lpTitle == NULL || !strcmp(startup.lpTitle, selfname), - "StartupInfoA:lpTitle expected '%s' or null, got '%s'\n", selfname, startup.lpTitle); + result = getChildString( "StartupInfoA", "lpTitle" ); + todo_wine ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), + "expected '%s' or null, got '%s'\n", selfname, result ); okChildInt("StartupInfoA", "dwX", startup.dwX); okChildInt("StartupInfoA", "dwY", startup.dwY); okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); @@ -1185,6 +1187,7 @@ static void test_SuspendFlag(void) PROCESS_INFORMATION info; STARTUPINFOA startup, us; DWORD exit_status; + char *result;
/* let's start simplistic */ memset(&startup, 0, sizeof(startup)); @@ -1210,8 +1213,9 @@ static void test_SuspendFlag(void)
okChildInt("StartupInfoA", "cb", startup.cb); okChildString("StartupInfoA", "lpDesktop", us.lpDesktop); - ok (startup.lpTitle == NULL || !strcmp(startup.lpTitle, selfname), - "StartupInfoA:lpTitle expected '%s' or null, got '%s'\n", selfname, startup.lpTitle); + result = getChildString( "StartupInfoA", "lpTitle" ); + todo_wine ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), + "expected '%s' or null, got '%s'\n", selfname, result ); okChildInt("StartupInfoA", "dwX", startup.dwX); okChildInt("StartupInfoA", "dwY", startup.dwY); okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); @@ -1233,6 +1237,7 @@ static void test_DebuggingFlag(void) STARTUPINFOA startup, us; DEBUG_EVENT de; unsigned dbg = 0; + char *result;
/* let's start simplistic */ memset(&startup, 0, sizeof(startup)); @@ -1270,8 +1275,9 @@ static void test_DebuggingFlag(void)
okChildInt("StartupInfoA", "cb", startup.cb); okChildString("StartupInfoA", "lpDesktop", us.lpDesktop); - ok (startup.lpTitle == NULL || !strcmp(startup.lpTitle, selfname), - "StartupInfoA:lpTitle expected '%s' or null, got '%s'\n", selfname, startup.lpTitle); + result = getChildString( "StartupInfoA", "lpTitle" ); + todo_wine ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), + "expected '%s' or null, got '%s'\n", selfname, result ); okChildInt("StartupInfoA", "dwX", startup.dwX); okChildInt("StartupInfoA", "dwY", startup.dwY); okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); @@ -1304,6 +1310,7 @@ static void test_Console(void) const char* msg = "This is a std-handle inheritance test."; unsigned msg_len; BOOL run_tests = TRUE; + char *result;
memset(&startup, 0, sizeof(startup)); startup.cb = sizeof(startup); @@ -1381,8 +1388,9 @@ static void test_Console(void)
okChildInt("StartupInfoA", "cb", startup.cb); okChildString("StartupInfoA", "lpDesktop", us.lpDesktop); - ok (startup.lpTitle == NULL || !strcmp(startup.lpTitle, selfname), - "StartupInfoA:lpTitle expected '%s' or null, got '%s'\n", selfname, startup.lpTitle); + result = getChildString( "StartupInfoA", "lpTitle" ); + todo_wine ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), + "expected '%s' or null, got '%s'\n", selfname, result ); okChildInt("StartupInfoA", "dwX", startup.dwX); okChildInt("StartupInfoA", "dwY", startup.dwY); okChildInt("StartupInfoA", "dwXSize", startup.dwXSize);