sync netapi32_winetest with wine 1.1.34
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 6 Dec 2009 09:50:53 +0000 (09:50 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 6 Dec 2009 09:50:53 +0000 (09:50 +0000)
svn path=/trunk/; revision=44436

rostests/winetests/netapi32/access.c
rostests/winetests/netapi32/apibuf.c
rostests/winetests/netapi32/wksta.c

index 8c39a18..2f29684 100644 (file)
@@ -155,16 +155,19 @@ static void run_usergetinfo_tests(void)
     todo_wine {
         /* FIXME - Currently Wine can't verify whether the network path is good or bad */
         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);
     }
     rc=pNetUserGetInfo(sEmptyStr, sTestUserName, 0, (LPBYTE *)&ui0);
     ok(rc == ERROR_BAD_NETPATH || rc == NERR_Success,
        "Bad Network Path: rc=%d\n",rc);
     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);
-    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)
         trace("Deleting the test user failed. You might have to manually delete it.\n");
index 0972e76..3400726 100644 (file)
@@ -54,7 +54,6 @@ static void run_apibuf_tests(void)
 
     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");
 
     /* border reallocate cases */
index e0c16d3..c5929de 100644 (file)
@@ -173,7 +173,8 @@ static void run_wkstatransportenum_tests(void)
 
         ok(bufPtr != NULL, "got data back\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);
     }
 }
@@ -198,7 +199,10 @@ START_TEST(wksta)
     }
 
     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_wkstatransportenum_tests();
     }