Alexandre Julliard : setupapi/tests: Don' t compare the drive letter of expanded file paths.

Alexandre Julliard julliard at winehq.org
Wed Feb 4 09:15:32 CST 2009


Module: wine
Branch: master
Commit: 486e66ed6edf3805a07e55e6875d349499e20bb2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=486e66ed6edf3805a07e55e6875d349499e20bb2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Feb  3 22:23:35 2009 +0100

setupapi/tests: Don't compare the drive letter of expanded file paths.

---

 dlls/setupapi/tests/parser.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c
index ddfd0f2..0aa78c1 100644
--- a/dlls/setupapi/tests/parser.c
+++ b/dlls/setupapi/tests/parser.c
@@ -439,6 +439,11 @@ static void test_key_names(void)
                             !strcmp( field, A1200), /* Vista, W2K8 */
                             "line %u: bad field %s/%s\n",
                             i, field, key_names[i].fields[index] );
+                    else  /* don't compare drive letter of paths */
+                        if (field[0] && field[1] == ':' && field[2] == '\\')
+                        ok( !strcmp( field + 1, key_names[i].fields[index] + 1 ),
+                            "line %u: bad field %s/%s\n",
+                            i, field, key_names[i].fields[index] );
                     else
                         ok( !strcmp( field, key_names[i].fields[index] ), "line %u: bad field %s/%s\n",
                             i, field, key_names[i].fields[index] );
@@ -584,18 +589,18 @@ static void test_SetupGetIntField(void)
         retb = SetupGetIntField( &context, keys[i].index, &intfield );
         if ( keys[i].err == ERROR_SUCCESS )
         {
-            ok( retb, "Expected success\n" );
+            ok( retb, "%u: Expected success\n", i );
             ok( GetLastError() == ERROR_SUCCESS ||
                 GetLastError() == 0xdeadbeef /* win9x, NT4 */,
-                "Expected ERROR_SUCCESS or 0xdeadbeef, got %u\n", GetLastError() );
+                "%u: Expected ERROR_SUCCESS or 0xdeadbeef, got %u\n", i, GetLastError() );
         }
         else
         {
-            ok( !retb, "Expected failure\n" );
+            ok( !retb, "%u: Expected failure\n", i );
             ok( GetLastError() == keys[i].err,
-                "Expected %d, got %u\n", keys[i].err, GetLastError() );
+                "%u: Expected %d, got %u\n", i, keys[i].err, GetLastError() );
         }
-        ok( intfield == keys[i].value, "Expected %d, got %d\n", keys[i].value, intfield );
+        ok( intfield == keys[i].value, "%u: Expected %d, got %d\n", i, keys[i].value, intfield );
 
         SetupCloseInfFile( hinf );
     }




More information about the wine-cvs mailing list