Contains tests added by Jeff Smith whydoubt@gmail.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/kernelbase/tests/path.c | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+)
diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c index b5da303629..abe586b0a2 100644 --- a/dlls/kernelbase/tests/path.c +++ b/dlls/kernelbase/tests/path.c @@ -72,6 +72,7 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"\\?C:a", "\\?C:a", 0, S_OK},
/* No . */ + {"*", "*", 0, S_OK}, {"", "\", 0, S_OK}, {"C:", "C:", 0, S_OK}, {"C:\", "C:\", 0, S_OK}, @@ -83,19 +84,41 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"..", "\", 0, S_OK}, {"...", "\", 0, S_OK}, {"*.", "*.", 0, S_OK}, + {"*.\", "*.\", 0, S_OK}, + {"*.\", "*.\", 0, S_OK}, {"*..", "*.", 0, S_OK}, + {"*..\", "*..\", 0, S_OK}, {"*...", "*.", 0, S_OK}, + {"*...\", "*...\", 0, S_OK}, + {"*....", "*.", 0, S_OK}, + {"*....\", "*....\", 0, S_OK}, + {".a", ".a", 0, S_OK}, + {".a\", ".a\", 0, S_OK}, {"a.", "a", 0, S_OK}, + {"a.\", "a.\", 0, S_OK}, + {".a.", ".a", 0, S_OK}, {"a.b", "a.b", 0, S_OK}, + {".a.b.", ".a.b", 0, S_OK}, {"a\.", "a", 0, S_OK}, {"a\.\b", "a\b", 0, S_OK}, + {"a\.b", "a\.b", 0, S_OK}, + {"a\.b\", "a\.b\", 0, S_OK}, + {":.", ":", 0, S_OK}, + {"::.", "::\", 0, S_OK}, + {":::.", ":::", 0, S_OK}, {"C:.", "C:\", 0, S_OK}, + {"C:.\", "C:.\", 0, S_OK}, + {"C:.\.", "C:\", 0, S_OK}, {"C:\.", "C:\", 0, S_OK}, {"C:\.\", "C:\", 0, S_OK}, {"C:\a.", "C:\a", 0, S_OK}, + {"C:\a.\", "C:\a.\", 0, S_OK}, + {"C:\.a", "C:\.a", 0, S_OK}, + {"C:\.a\", "C:\.a\", 0, S_OK}, {"C:\a\.", "C:\a", 0, S_OK}, {"C:\a\\.", "C:\a\", 0, S_OK}, {"C:\a\\\.", "C:\a\\", 0, S_OK}, + {".\", "\", 0, S_OK}, {"\.", "\", 0, S_OK}, {"\\.", "\\", 0, S_OK}, {"\\.\", "\\", 0, S_OK}, @@ -115,21 +138,53 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = "\\?\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}\", 0, S_OK},
/* .. */ + {"..a", "..a", 0, S_OK}, + {"..a\", "..a\", 0, S_OK}, + {"...a", "...a", 0, S_OK}, + {"...a\", "...a\", 0, S_OK}, + {"....a", "....a", 0, S_OK}, {"a..", "a", 0, S_OK}, + {"a..\", "a..\", 0, S_OK}, + {"a...", "a", 0, S_OK}, + {"a...\", "a...\", 0, S_OK}, + {"a....", "a", 0, S_OK}, + {"a....\", "a....\", 0, S_OK}, + {"..a..", "..a", 0, S_OK}, {"a..b", "a..b", 0, S_OK}, + {"..a..b..", "..a..b", 0, S_OK}, {"a\..", "\", 0, S_OK}, {"a\..\", "\", 0, S_OK}, {"a\..\b", "\b", 0, S_OK}, + {":..", ":", 0, S_OK}, + {"::..", "::\", 0, S_OK}, + {":::..", ":::", 0, S_OK}, {"C:..", "C:\", 0, S_OK}, + {"C:...", "C:\", 0, S_OK}, + {"C:..\", "C:..\", 0, S_OK}, + {"C:..\\", "C:..\\", 0, S_OK}, + {"C:...\", "C:...\", 0, S_OK}, {"C:\..", "C:\", 0, S_OK}, + {"C:\..a", "C:\..a", 0, S_OK}, + {"C:\..a\", "C:\..a\", 0, S_OK}, + {"C:\...a", "C:\...a", 0, S_OK}, + {"C:\...a\", "C:\...a\", 0, S_OK}, + {"C:\....a", "C:\....a", 0, S_OK}, + {"C:\....a\", "C:\....a\", 0, S_OK}, + {"C:\a..", "C:\a", 0, S_OK}, + {"C:\a..\", "C:\a..\", 0, S_OK}, {"C:\\..", "C:\", 0, S_OK}, {"C:\..\", "C:\", 0, S_OK}, + {"C:\...\", "C:\...\", 0, S_OK}, {"C:\a\..", "C:\", 0, S_OK}, + {"C:\a\b..", "C:\a\b", 0, S_OK}, {"C:\a\\..", "C:\a", 0, S_OK}, {"C:\a\\\..", "C:\a\", 0, S_OK}, {"C:\a\..\b", "C:\b", 0, S_OK}, {"C:\a\..\\b", "C:\\b", 0, S_OK}, + {"..\", "\", 0, S_OK}, + {"...\", "...\", 0, S_OK}, {"\..", "\", 0, S_OK}, + {"\...", "\", 0, S_OK}, {"\\..", "\\", 0, S_OK}, {"\\\..", "\", 0, S_OK}, {"\\..\", "\\", 0, S_OK}, @@ -249,6 +304,8 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] =
/* PATHCCH_DO_NOT_NORMALIZE_SEGMENTS */ /* No effect for spaces */ + {"a ", "a ", 0, S_OK}, + {"C:\a ", "C:\a ", 0, S_OK}, {"C:\a \", "C:\a \", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a\ ", "C:\a\ ", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a ", "C:\a ", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, @@ -263,8 +320,15 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"*..", "*..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {".", "\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"..", "\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":.", ":.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {"::.", "::.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":::.", ":::.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":..", ":..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {"::..", "::..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":::..", ":::..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:.", "C:.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:..", "C:..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {"C:...", "C:...", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a\.", "C:\a", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a\..", "C:\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a.", "C:\a.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
Signed-off-by: Jeff Smith whydoubt@gmail.com
On Wed, Sep 18, 2019 at 11:05 PM Zhiyi Zhang zzhang@codeweavers.com wrote:
Contains tests added by Jeff Smith whydoubt@gmail.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
dlls/kernelbase/tests/path.c | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+)
diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c index b5da303629..abe586b0a2 100644 --- a/dlls/kernelbase/tests/path.c +++ b/dlls/kernelbase/tests/path.c @@ -72,6 +72,7 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"\\?C:a", "\\?C:a", 0, S_OK},
/* No . */
- {"*", "*", 0, S_OK}, {"", "\", 0, S_OK}, {"C:", "C:", 0, S_OK}, {"C:\", "C:\", 0, S_OK},
@@ -83,19 +84,41 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"..", "\", 0, S_OK}, {"...", "\", 0, S_OK}, {"*.", "*.", 0, S_OK},
- {"*.\", "*.\", 0, S_OK},
- {"*.\", "*.\", 0, S_OK}, {"*..", "*.", 0, S_OK},
- {"*..\", "*..\", 0, S_OK}, {"*...", "*.", 0, S_OK},
- {"*...\", "*...\", 0, S_OK},
- {"*....", "*.", 0, S_OK},
- {"*....\", "*....\", 0, S_OK},
- {".a", ".a", 0, S_OK},
- {".a\", ".a\", 0, S_OK}, {"a.", "a", 0, S_OK},
- {"a.\", "a.\", 0, S_OK},
- {".a.", ".a", 0, S_OK}, {"a.b", "a.b", 0, S_OK},
- {".a.b.", ".a.b", 0, S_OK}, {"a\.", "a", 0, S_OK}, {"a\.\b", "a\b", 0, S_OK},
- {"a\.b", "a\.b", 0, S_OK},
- {"a\.b\", "a\.b\", 0, S_OK},
- {":.", ":", 0, S_OK},
- {"::.", "::\", 0, S_OK},
- {":::.", ":::", 0, S_OK}, {"C:.", "C:\", 0, S_OK},
- {"C:.\", "C:.\", 0, S_OK},
- {"C:.\.", "C:\", 0, S_OK}, {"C:\.", "C:\", 0, S_OK}, {"C:\.\", "C:\", 0, S_OK}, {"C:\a.", "C:\a", 0, S_OK},
- {"C:\a.\", "C:\a.\", 0, S_OK},
- {"C:\.a", "C:\.a", 0, S_OK},
- {"C:\.a\", "C:\.a\", 0, S_OK}, {"C:\a\.", "C:\a", 0, S_OK}, {"C:\a\\.", "C:\a\", 0, S_OK}, {"C:\a\\\.", "C:\a\\", 0, S_OK},
- {".\", "\", 0, S_OK}, {"\.", "\", 0, S_OK}, {"\\.", "\\", 0, S_OK}, {"\\.\", "\\", 0, S_OK},
@@ -115,21 +138,53 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = "\\?\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}\", 0, S_OK},
/* .. */
- {"..a", "..a", 0, S_OK},
- {"..a\", "..a\", 0, S_OK},
- {"...a", "...a", 0, S_OK},
- {"...a\", "...a\", 0, S_OK},
- {"....a", "....a", 0, S_OK}, {"a..", "a", 0, S_OK},
- {"a..\", "a..\", 0, S_OK},
- {"a...", "a", 0, S_OK},
- {"a...\", "a...\", 0, S_OK},
- {"a....", "a", 0, S_OK},
- {"a....\", "a....\", 0, S_OK},
- {"..a..", "..a", 0, S_OK}, {"a..b", "a..b", 0, S_OK},
- {"..a..b..", "..a..b", 0, S_OK}, {"a\..", "\", 0, S_OK}, {"a\..\", "\", 0, S_OK}, {"a\..\b", "\b", 0, S_OK},
- {":..", ":", 0, S_OK},
- {"::..", "::\", 0, S_OK},
- {":::..", ":::", 0, S_OK}, {"C:..", "C:\", 0, S_OK},
- {"C:...", "C:\", 0, S_OK},
- {"C:..\", "C:..\", 0, S_OK},
- {"C:..\\", "C:..\\", 0, S_OK},
- {"C:...\", "C:...\", 0, S_OK}, {"C:\..", "C:\", 0, S_OK},
- {"C:\..a", "C:\..a", 0, S_OK},
- {"C:\..a\", "C:\..a\", 0, S_OK},
- {"C:\...a", "C:\...a", 0, S_OK},
- {"C:\...a\", "C:\...a\", 0, S_OK},
- {"C:\....a", "C:\....a", 0, S_OK},
- {"C:\....a\", "C:\....a\", 0, S_OK},
- {"C:\a..", "C:\a", 0, S_OK},
- {"C:\a..\", "C:\a..\", 0, S_OK}, {"C:\\..", "C:\", 0, S_OK}, {"C:\..\", "C:\", 0, S_OK},
- {"C:\...\", "C:\...\", 0, S_OK}, {"C:\a\..", "C:\", 0, S_OK},
- {"C:\a\b..", "C:\a\b", 0, S_OK}, {"C:\a\\..", "C:\a", 0, S_OK}, {"C:\a\\\..", "C:\a\", 0, S_OK}, {"C:\a\..\b", "C:\b", 0, S_OK}, {"C:\a\..\\b", "C:\\b", 0, S_OK},
- {"..\", "\", 0, S_OK},
- {"...\", "...\", 0, S_OK}, {"\..", "\", 0, S_OK},
- {"\...", "\", 0, S_OK}, {"\\..", "\\", 0, S_OK}, {"\\\..", "\", 0, S_OK}, {"\\..\", "\\", 0, S_OK},
@@ -249,6 +304,8 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] =
/* PATHCCH_DO_NOT_NORMALIZE_SEGMENTS */ /* No effect for spaces */
- {"a ", "a ", 0, S_OK},
- {"C:\a ", "C:\a ", 0, S_OK}, {"C:\a \", "C:\a \", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a\ ", "C:\a\ ", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a ", "C:\a ", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
@@ -263,8 +320,15 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"*..", "*..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {".", "\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"..", "\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
- {":.", ":.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
- {"::.", "::.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
- {":::.", ":::.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
- {":..", ":..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
- {"::..", "::..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
- {":::..", ":::..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:.", "C:.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:..", "C:..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
- {"C:...", "C:...", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a\.", "C:\a", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a\..", "C:\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\a.", "C:\a.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
-- 2.23.0