[PATCH 3/5] ntdll/tests: Add more tests for RtlDosPathNameToNtPathName_U().

Zebediah Figura z.figura12 at gmail.com
Tue Feb 2 18:17:13 CST 2021


From: Zebediah Figura <zfigura at codeweavers.com>

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/ntdll/tests/path.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index 6b3be9e9541..5342d101b4f 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.c
@@ -436,6 +436,18 @@ static void test_RtlDosPathNameToNtPathName_U(void)
         {L"c:/",            L"\\??\\c:\\",                  -1},
         {L"c:/foo",         L"\\??\\c:\\foo",                7},
         {L"c:/foo.",        L"\\??\\c:\\foo",                7},
+        {L"c:/foo ",        L"\\??\\c:\\foo",                7},
+        {L"c:/foo . .",     L"\\??\\c:\\foo",                7},
+        {L"c:/foo.a",       L"\\??\\c:\\foo.a",              7},
+        {L"c:/foo a",       L"\\??\\c:\\foo a",              7},
+        {L"c:/foo*",        L"\\??\\c:\\foo*",               7},
+        {L"c:/foo*a",       L"\\??\\c:\\foo*a",              7},
+        {L"c:/foo?",        L"\\??\\c:\\foo?",               7},
+        {L"c:/foo?a",       L"\\??\\c:\\foo?a",              7},
+        {L"c:/foo<",        L"\\??\\c:\\foo<",               7},
+        {L"c:/foo<a",       L"\\??\\c:\\foo<a",              7},
+        {L"c:/foo>",        L"\\??\\c:\\foo>",               7},
+        {L"c:/foo>a",       L"\\??\\c:\\foo>a",              7},
         {L"c:/foo/",        L"\\??\\c:\\foo\\",             -1},
         {L"c:/foo//",       L"\\??\\c:\\foo\\",             -1},
         {L"C:/foo",         L"\\??\\C:\\foo",                7},
@@ -477,6 +489,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
         {L"//./foo/bar",    L"\\??\\foo\\bar",               8},
         {L"//./foo/.",      L"\\??\\foo",                    4},
         {L"//./foo/..",     L"\\??\\",                      -1},
+        {L"//./foo. . ",    L"\\??\\foo",                    4},
 
         {L"//?",            L"\\??\\",                      -1},
         {L"//?/",           L"\\??\\",                      -1},
@@ -486,6 +499,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
         {L"//?/foo/bar",    L"\\??\\foo\\bar",               8},
         {L"//?/foo/.",      L"\\??\\foo",                    4},
         {L"//?/foo/..",     L"\\??\\",                      -1},
+        {L"//?/foo. . ",    L"\\??\\foo",                    4},
 
         {L"\\\\.",          L"\\??\\",                      -1},
         {L"\\\\.\\",        L"\\??\\",                      -1},
@@ -495,6 +509,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
         {L"\\\\.\\foo/bar", L"\\??\\foo\\bar",               8},
         {L"\\\\.\\foo/.",   L"\\??\\foo",                    4},
         {L"\\\\.\\foo/..",  L"\\??\\",                      -1},
+        {L"\\\\.\\foo. . ", L"\\??\\foo",                    4},
 
         {L"\\\\?",          L"\\??\\",                      -1},
         {L"\\\\?\\",        L"\\??\\",                      -1},
@@ -511,6 +526,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
         {L"\\\\?\\foo\\bar",L"\\??\\foo\\bar",               8},
         {L"\\\\?\\foo\\.",  L"\\??\\foo\\.",                 8},
         {L"\\\\?\\foo\\..", L"\\??\\foo\\..",                8},
+        {L"\\\\?\\foo. . ", L"\\??\\foo. . ",                4},
 
         {L"\\??",           L"\\??\\C:\\??",                 7},
         {L"\\??\\",         L"\\??\\C:\\??\\",              -1},
@@ -527,6 +543,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
         {L"\\??\\foo\\bar", L"\\??\\foo\\bar",               8},
         {L"\\??\\foo\\.",   L"\\??\\foo\\.",                 8},
         {L"\\??\\foo\\..",  L"\\??\\foo\\..",                8},
+        {L"\\??\\foo. . ",  L"\\??\\foo. . ",                4},
 
         {L"CONIN$",         L"\\??\\CONIN$",                -1, L"\\??\\C:\\windows\\CONIN$"  /* winxp */ },
         {L"CONOUT$",        L"\\??\\CONOUT$",               -1, L"\\??\\C:\\windows\\CONOUT$" /* winxp */ },
-- 
2.20.1




More information about the wine-devel mailing list