Module: wine Branch: master Commit: 672952d2b6abf525d3ccd73b68ee418f51f8eae2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=672952d2b6abf525d3ccd73b68...
Author: James Hawkins truiken@gmail.com Date: Wed Mar 28 01:56:39 2007 -0500
setupapi: Correct the Inf output position.
---
dlls/setupapi/misc.c | 2 +- dlls/setupapi/tests/misc.c | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index eb3c3a1..4c7786f 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -978,7 +978,7 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location, } }
- if (component) *component = p; + if (component) *component = p + 1; if (required_size) *required_size = size;
return ret; diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index 27dcc77..d566816 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -92,7 +92,7 @@ static BOOL check_format(LPSTR path, LPSTR inf)
GetWindowsDirectory(check, MAX_PATH); lstrcat(check, format); - res = !strncmp(check, path, lstrlen(check)) && + res = !strncasecmp(check, path, lstrlen(check)) && path[lstrlen(check)] != '\';
return (!inf) ? res : res && (inf == path + lstrlen(check) - 3); @@ -196,10 +196,7 @@ static void test_SetupCopyOEMInf(void) ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(lstrlen(dest) != 0, "Expected a non-zero length string\n"); ok(file_exists(dest), "Expected destination inf to exist\n"); - todo_wine - { - ok(check_format(dest, NULL), "Expected %%windir%%\inf\OEMx.inf, got %s\n", dest); - } + ok(check_format(dest, NULL), "Expected %%windir%%\inf\OEMx.inf, got %s\n", dest); ok(file_exists(path), "Expected source inf to exist\n");
lstrcpy(dest_save, dest); @@ -227,10 +224,7 @@ static void test_SetupCopyOEMInf(void) ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(lstrlen(dest) + 1 == size, "Expected sizes to match, got (%d, %d)\n", lstrlen(dest), size); ok(file_exists(dest), "Expected destination inf to exist\n"); - todo_wine - { - ok(check_format(dest, NULL), "Expected %%windir%%\inf\OEMx.inf, got %s\n", dest); - } + ok(check_format(dest, NULL), "Expected %%windir%%\inf\OEMx.inf, got %s\n", dest); ok(file_exists(path), "Expected source inf to exist\n"); ok(size == lstrlen(dest_save) + 1, "Expected size to be lstrlen(dest_save) + 1\n");
@@ -241,10 +235,7 @@ static void test_SetupCopyOEMInf(void) ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(lstrlen(dest) + 1 == size, "Expected sizes to match, got (%d, %d)\n", lstrlen(dest), size); ok(file_exists(dest), "Expected destination inf to exist\n"); - todo_wine - { - ok(check_format(dest, inf), "Expected %%windir%%\inf\OEMx.inf, got %s\n", dest); - } + ok(check_format(dest, inf), "Expected %%windir%%\inf\OEMx.inf, got %s\n", dest); ok(file_exists(path), "Expected source inf to exist\n"); ok(size == lstrlen(dest_save) + 1, "Expected size to be lstrlen(dest_save) + 1\n");