ADVPACK/tests: exit after 0x8007007e

Saulius Krasuckas saulius2 at ar.fi.lt
Wed Nov 16 18:02:08 CST 2005


I didn't see point in adding HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) 
value into every checks for TranslateInfString(), as all they fails in the 
same way later.  I guess, this is because of NT3.51 unability to parse 
usual INF-files.


Log message:
	Saulius Krasuckas <saulius.krasuckas at ieee.org>
	Exit test after first TranslateInfString() failure, which seems to 
	be NT3.51 specific.


Index: dlls/advpack/tests/advpack.c
===================================================================
RCS file: /home/wine/wine/dlls/advpack/tests/advpack.c,v
retrieving revision 1.8
diff -p -u -r1.8 advpack.c
--- dlls/advpack/tests/advpack.c	14 Nov 2005 12:27:39 -0000	1.8
+++ dlls/advpack/tests/advpack.c	16 Nov 2005 22:40:48 -0000
@@ -183,8 +183,15 @@ static void translateinfstring_test()
     /* try to open an inf file that doesn't exist */
     hr = pTranslateInfString("c:\\a.inf", "Options.NTx86", "Options.NTx86",
                              "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
-    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == E_INVALIDARG, 
-       "Expected 0x80070002 or E_INVALIDARG, got 0x%08x\n", (UINT)hr);
+    ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == E_INVALIDARG || 
+       hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND), 
+       "Expected E_INVALIDARG, 0x80070002 or 0x8007007e, got 0x%08x\n", (UINT)hr);
+
+    if(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND))
+    {
+        trace("WinNT 3.51 detected. Skipping tests for TranslateInfString()");
+        return;
+    }
 
     /* try a nonexistent section */
     buffer[0] = 0;



More information about the wine-patches mailing list