mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
mpr-WNetGetUniversalNameW: Fix a couple of test failures.
This commit is contained in:
parent
4564b0148b
commit
352d7723f5
@ -1,4 +1,4 @@
|
||||
From 46832825a6821d5c2af8eb0ae66581e94972231b Mon Sep 17 00:00:00 2001
|
||||
From 98a994918027aac485362b84a843096e0f5c3284 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 18 Oct 2015 03:27:41 +0200
|
||||
Subject: mpr: Return correct error code for non network paths and
|
||||
@ -9,36 +9,63 @@ Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Michael Müller <michael@fds-team.de>
|
||||
---
|
||||
dlls/mpr/tests/mpr.c | 6 +++---
|
||||
dlls/mpr/wnet.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
dlls/mpr/tests/mpr.c | 10 ++++------
|
||||
dlls/mpr/wnet.c | 2 +-
|
||||
2 files changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c
|
||||
index 99b05f6..bf3d2cc 100644
|
||||
index ee1ff3a..ee9e220 100644
|
||||
--- a/dlls/mpr/tests/mpr.c
|
||||
+++ b/dlls/mpr/tests/mpr.c
|
||||
@@ -149,13 +149,13 @@ static void test_WNetGetRemoteName(void)
|
||||
@@ -101,25 +101,23 @@ static void test_WNetGetRemoteName(void)
|
||||
info_size = sizeof(buffer);
|
||||
ret = WNetGetUniversalNameW(driveW, REMOTE_NAME_INFO_LEVEL,
|
||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||
buffer, &info_size);
|
||||
- todo_wine{
|
||||
+
|
||||
if(drive_type == DRIVE_REMOTE)
|
||||
- ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: %08x\n", ret);
|
||||
+ todo_wine ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: %08x\n", ret);
|
||||
+ todo_wine
|
||||
ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||
else
|
||||
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
|
||||
"(%s) WNetGetUniversalNameW gave wrong error: %u\n", driveA, ret);
|
||||
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
||||
- }
|
||||
+
|
||||
ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
|
||||
}
|
||||
}
|
||||
|
||||
fail_size = 0;
|
||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||
buffer, &fail_size);
|
||||
- todo_wine{
|
||||
if(drive_type == DRIVE_REMOTE)
|
||||
+ todo_wine
|
||||
ok(ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||
else
|
||||
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
|
||||
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
||||
- }
|
||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||
buffer, NULL);
|
||||
todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||
@@ -127,13 +125,13 @@ static void test_WNetGetRemoteName(void)
|
||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||
NULL, &info_size);
|
||||
|
||||
- todo_wine{
|
||||
if(((GetVersion() & 0x8000ffff) == 0x00000004) || /* NT40 */
|
||||
(drive_type == DRIVE_REMOTE))
|
||||
+ todo_wine
|
||||
ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret);
|
||||
else
|
||||
ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
|
||||
- "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret); }
|
||||
+ "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
|
||||
|
||||
fail_size = sizeof(driveA) / sizeof(char) - 1;
|
||||
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
|
||||
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
|
||||
index dd34969..4c1d221 100644
|
||||
index 0d4209c..5973089 100644
|
||||
--- a/dlls/mpr/wnet.c
|
||||
+++ b/dlls/mpr/wnet.c
|
||||
@@ -1958,7 +1958,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
|
||||
@@ -2111,7 +2111,7 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
|
||||
break;
|
||||
}
|
||||
case REMOTE_NAME_INFO_LEVEL:
|
||||
@ -48,5 +75,5 @@ index dd34969..4c1d221 100644
|
||||
|
||||
default:
|
||||
--
|
||||
2.6.1
|
||||
2.8.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user