From: Rayhan Faizel rayhan.faizel@hotmail.com
--- dlls/ntdll/tests/path.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index 3f41b27a522..6b5a5f04e17 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c @@ -437,6 +437,7 @@ static void test_RtlDosPathNameToNtPathName_U(void) int file_offset; /* offset to file part */ const WCHAR* relative; const WCHAR *alt_nt; + const WCHAR *alt_relative; BOOL may_fail; } tests[] = @@ -527,7 +528,7 @@ static void test_RtlDosPathNameToNtPathName_U(void) {L"\\.\foo/.", L"\??\foo", 4, NULL}, {L"\\.\foo/..", L"\??\", -1, NULL}, {L"\\.\foo. . ", L"\??\foo", 4, NULL}, - {L"\\.\CON", L"\??\CON", 4, NULL,NULL, TRUE}, /* broken on win7 */ + {L"\\.\CON", L"\??\CON", 4, NULL,NULL, NULL, TRUE}, /* broken on win7 */ {L"\\.\CONIN$", L"\??\CONIN$", 4, NULL}, {L"\\.\CONOUT$", L"\??\CONOUT$", 4, NULL},
@@ -565,9 +566,9 @@ static void test_RtlDosPathNameToNtPathName_U(void) {L"\??\foo\..", L"\??\foo\..", 8, NULL}, {L"\??\foo. . ", L"\??\foo. . ", 4, NULL},
- {L"CONIN$", L"\??\CONIN$", -1, NULL,L"\??\C:\windows\CONIN$" /* win7 */ }, - {L"CONOUT$", L"\??\CONOUT$", -1, NULL,L"\??\C:\windows\CONOUT$" /* win7 */ }, - {L"cOnOuT$", L"\??\cOnOuT$", -1, NULL,L"\??\C:\windows\cOnOuT$" /* win7 */ }, + {L"CONIN$", L"\??\CONIN$", -1, NULL,L"\??\C:\windows\CONIN$", L"CONIN$" /* win7 */ }, + {L"CONOUT$", L"\??\CONOUT$", -1, NULL,L"\??\C:\windows\CONOUT$", L"CONOUT$" /* win7 */ }, + {L"cOnOuT$", L"\??\cOnOuT$", -1, NULL,L"\??\C:\windows\cOnOuT$", L"cOnOuT$" /* win7 */ }, {L"CONERR$", L"\??\C:\windows\CONERR$", 15, L"CONERR$"}, }; static const WCHAR *error_paths[] = { @@ -638,8 +639,16 @@ static void test_RtlDosPathNameToNtPathName_U(void)
if (tests[i].relative) { - ok(rtl.RelativeName.Buffer != NULL && !wcscmp(rtl.RelativeName.Buffer,tests[i].relative), - "%s: Expected %s, got %s.\n", debugstr_w(tests[i].dos), debugstr_w(tests[i].relative), debugstr_w(rtl.RelativeName.Buffer)); + ok(rtl.RelativeName.Buffer && + !wcscmp(rtl.RelativeName.Buffer,tests[i].relative) , + "%s: Expected relative path %s, got %s.\n", debugstr_w(tests[i].dos), debugstr_w(tests[i].relative), debugstr_w(rtl.RelativeName.Buffer)); + ok(rtl.ContainerDirectory != 0, "%s: containing directory handle not created.\n",debugstr_w(tests[i].dos)); + } + else if (broken(tests[i].alt_relative != NULL)) + { + ok(rtl.RelativeName.Buffer != NULL && + !wcscmp(rtl.RelativeName.Buffer,tests[i].alt_relative) , + "%s: Expected alternate relative path %s, got %s.\n", debugstr_w(tests[i].dos), debugstr_w(tests[i].relative), debugstr_w(rtl.RelativeName.Buffer)); ok(rtl.ContainerDirectory != 0, "%s: containing directory handle not created.\n",debugstr_w(tests[i].dos)); } else