kernelbase/tests: Add more tests for combining the second path.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9323d33fa4
commit
ac7f6fda43
|
@ -426,6 +426,7 @@ struct combine_test
|
|||
const CHAR *path1;
|
||||
const CHAR *path2;
|
||||
const CHAR *result;
|
||||
BOOL todo;
|
||||
};
|
||||
|
||||
static const struct combine_test combine_tests[] =
|
||||
|
@ -473,12 +474,21 @@ static const struct combine_test combine_tests[] =
|
|||
/* Second path is fully qualified */
|
||||
{"X:\\", "C:", "C:\\"},
|
||||
{"X:\\", "C:\\", "C:\\"},
|
||||
{"X:\\", "C:\\a", "C:\\a", TRUE},
|
||||
{"X:\\", "\\\\", "\\\\"},
|
||||
{"X:\\", "\\\\a", "\\\\a", TRUE},
|
||||
{"X:\\", "\\\\?\\C:", "C:\\"},
|
||||
{"X:\\", "\\\\?\\C:\\", "C:\\"},
|
||||
{"X:\\", "\\\\?\\C:\\a", "C:\\a", TRUE},
|
||||
{"X:\\", "\\\\?\\UNC", "\\\\?\\UNC", TRUE},
|
||||
{"X:\\", "\\\\?\\UNC\\", "\\\\"},
|
||||
{"X:\\", "\\\\?\\UNC\\a", "\\\\a", TRUE},
|
||||
{"X:\\", "\\\\?\\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}",
|
||||
"\\\\?\\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}", TRUE},
|
||||
{"X:\\", "\\\\?\\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}\\",
|
||||
"\\\\?\\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}\\"},
|
||||
{"X:\\", "\\\\?\\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}\\a",
|
||||
"\\\\?\\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}\\a", TRUE},
|
||||
|
||||
/* Canonicalization */
|
||||
{"C:\\a", ".\\b", "C:\\a\\b"},
|
||||
|
@ -537,6 +547,7 @@ static void test_PathAllocCombine(void)
|
|||
if (SUCCEEDED(hr))
|
||||
{
|
||||
WideCharToMultiByte(CP_ACP, 0, resultW, -1, resultA, ARRAY_SIZE(resultA), NULL, NULL);
|
||||
todo_wine_if(t->todo)
|
||||
ok(!lstrcmpA(resultA, t->result), "combine %s %s expect result %s, got %s\n", t->path1, t->path2, t->result,
|
||||
resultA);
|
||||
LocalFree(resultW);
|
||||
|
@ -600,6 +611,7 @@ static void test_PathCchCombine(void)
|
|||
|
||||
hr = pPathCchCombine(output, ARRAY_SIZE(output), p1, p2);
|
||||
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
|
||||
todo_wine_if(combine_tests[i].todo)
|
||||
ok(!lstrcmpW(output, expected), "Combining %s with %s returned %s, expected %s\n", wine_dbgstr_w(p1),
|
||||
wine_dbgstr_w(p2), wine_dbgstr_w(output), wine_dbgstr_w(expected));
|
||||
}
|
||||
|
@ -668,6 +680,7 @@ static void test_PathCchCombineEx(void)
|
|||
|
||||
hr = pPathCchCombineEx(output, MAX_PATH, p1, p2, 0);
|
||||
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
|
||||
todo_wine_if(combine_tests[i].todo)
|
||||
ok(!lstrcmpW(output, expected), "Combining %s with %s returned %s, expected %s\n",
|
||||
wine_dbgstr_w(p1), wine_dbgstr_w(p2), wine_dbgstr_w(output), wine_dbgstr_w(expected));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue