sync netapi32_winetest with wine 1.1.34

svn path=/trunk/; revision=44436
This commit is contained in:
Christoph von Wittich 2009-12-06 09:50:53 +00:00
parent d829b5a270
commit 0835abcb21
3 changed files with 12 additions and 6 deletions

View file

@ -155,16 +155,19 @@ static void run_usergetinfo_tests(void)
todo_wine { todo_wine {
/* FIXME - Currently Wine can't verify whether the network path is good or bad */ /* FIXME - Currently Wine can't verify whether the network path is good or bad */
rc=pNetUserGetInfo(sBadNetPath, sTestUserName, 0, (LPBYTE *)&ui0); rc=pNetUserGetInfo(sBadNetPath, sTestUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_BAD_NETPATH || rc == ERROR_NETWORK_UNREACHABLE, ok(rc == ERROR_BAD_NETPATH ||
rc == ERROR_NETWORK_UNREACHABLE ||
rc == RPC_S_SERVER_UNAVAILABLE ||
rc == RPC_S_INVALID_NET_ADDR, /* Some Win7 */
"Bad Network Path: rc=%d\n",rc); "Bad Network Path: rc=%d\n",rc);
} }
rc=pNetUserGetInfo(sEmptyStr, sTestUserName, 0, (LPBYTE *)&ui0); rc=pNetUserGetInfo(sEmptyStr, sTestUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_BAD_NETPATH || rc == NERR_Success, ok(rc == ERROR_BAD_NETPATH || rc == NERR_Success,
"Bad Network Path: rc=%d\n",rc); "Bad Network Path: rc=%d\n",rc);
rc=pNetUserGetInfo(sInvalidName, sTestUserName, 0, (LPBYTE *)&ui0); rc=pNetUserGetInfo(sInvalidName, sTestUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%d\n",rc); ok(rc == ERROR_INVALID_NAME || rc == ERROR_INVALID_HANDLE,"Invalid Server Name: rc=%d\n",rc);
rc=pNetUserGetInfo(sInvalidName2, sTestUserName, 0, (LPBYTE *)&ui0); rc=pNetUserGetInfo(sInvalidName2, sTestUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%d\n",rc); ok(rc == ERROR_INVALID_NAME || rc == ERROR_INVALID_HANDLE,"Invalid Server Name: rc=%d\n",rc);
if(delete_test_user() != NERR_Success) if(delete_test_user() != NERR_Success)
trace("Deleting the test user failed. You might have to manually delete it.\n"); trace("Deleting the test user failed. You might have to manually delete it.\n");

View file

@ -54,7 +54,6 @@ static void run_apibuf_tests(void)
ok(pNetApiBufferFree(p) == NERR_Success, "Freed\n"); ok(pNetApiBufferFree(p) == NERR_Success, "Freed\n");
ok(pNetApiBufferSize(p, &dwSize) == NERR_Success, "Got size\n");
ok(pNetApiBufferSize(NULL, &dwSize) == ERROR_INVALID_PARAMETER, "Error for NULL pointer\n"); ok(pNetApiBufferSize(NULL, &dwSize) == ERROR_INVALID_PARAMETER, "Error for NULL pointer\n");
/* border reallocate cases */ /* border reallocate cases */

View file

@ -173,7 +173,8 @@ static void run_wkstatransportenum_tests(void)
ok(bufPtr != NULL, "got data back\n"); ok(bufPtr != NULL, "got data back\n");
ok(entriesRead > 0, "read at least one transport\n"); ok(entriesRead > 0, "read at least one transport\n");
ok(totalEntries > 0, "at least one transport\n"); ok(totalEntries > 0 || broken(totalEntries == 0) /* Win7 */,
"at least one transport\n");
pNetApiBufferFree(bufPtr); pNetApiBufferFree(bufPtr);
} }
} }
@ -198,7 +199,10 @@ START_TEST(wksta)
} }
if (init_wksta_tests()) { if (init_wksta_tests()) {
run_get_comp_name_tests(); if (pNetpGetComputerName)
run_get_comp_name_tests();
else
win_skip("Function NetpGetComputerName not available\n");
run_wkstausergetinfo_tests(); run_wkstausergetinfo_tests();
run_wkstatransportenum_tests(); run_wkstatransportenum_tests();
} }