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

This commit is contained in:
Alexandre Julliard 2009-02-03 22:23:35 +01:00
parent 5d0f3aa33b
commit 486e66ed6e
1 changed files with 10 additions and 5 deletions

View File

@ -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 );
}