Module: wine Branch: master Commit: 95af1823ca3c8a7cedf2f364600f8fee4aae7fde URL: http://source.winehq.org/git/wine.git/?a=commit;h=95af1823ca3c8a7cedf2f36460...
Author: Paul Vriens paul.vriens.wine@gmail.com Date: Thu Aug 16 14:07:36 2007 +0200
advapi32/tests: Skip a test when not properly logged in on win9x.
---
dlls/advapi32/tests/security.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index a49662c..25df835 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1302,8 +1302,15 @@ static void test_LookupAccountName(void) */
user_size = UNLEN + 1; + SetLastError(0xdeadbeef); ret = GetUserNameA(user_name, &user_size); - ok(ret, "Failed to get user name\n"); + if (!ret && (GetLastError() == ERROR_NOT_LOGGED_ON)) + { + /* Probably on win9x where the user used 'Cancel' instead of properly logging in */ + skip("Cannot get the user name (win9x and not logged in properly)\n"); + return; + } + ok(ret, "Failed to get user name : %d\n", GetLastError());
/* get sizes */ sid_size = 0;