diff options
-rw-r--r-- | tests/path/win32.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/path/win32.c b/tests/path/win32.c index ee87b706e..a5413c781 100644 --- a/tests/path/win32.c +++ b/tests/path/win32.c @@ -163,7 +163,35 @@ static void test_remove_namespace(const wchar_t *in, const wchar_t *expected) void test_path_win32__remove_namespace(void) { + test_remove_namespace(L"\\\\?\\C:\\Temp\\Foo", L"C:\\Temp\\Foo"); + test_remove_namespace(L"\\\\?\\C:\\", L"C:\\"); + test_remove_namespace(L"\\\\?\\", L""); + + test_remove_namespace(L"\\??\\C:\\Temp\\Foo", L"C:\\Temp\\Foo"); + test_remove_namespace(L"\\??\\C:\\", L"C:\\"); + test_remove_namespace(L"\\??\\", L""); + test_remove_namespace(L"\\\\?\\UNC\\server\\C$\\folder", L"\\\\server\\C$\\folder"); + test_remove_namespace(L"\\\\?\\UNC\\server\\C$\\folder", L"\\\\server\\C$\\folder"); + test_remove_namespace(L"\\\\?\\UNC\\server\\C$", L"\\\\server\\C$"); + test_remove_namespace(L"\\\\?\\UNC\\server\\", L"\\\\server"); + test_remove_namespace(L"\\\\?\\UNC\\server", L"\\\\server"); + + test_remove_namespace(L"\\??\\UNC\\server\\C$\\folder", L"\\\\server\\C$\\folder"); + test_remove_namespace(L"\\??\\UNC\\server\\C$\\folder", L"\\\\server\\C$\\folder"); + test_remove_namespace(L"\\??\\UNC\\server\\C$", L"\\\\server\\C$"); + test_remove_namespace(L"\\??\\UNC\\server\\", L"\\\\server"); + test_remove_namespace(L"\\??\\UNC\\server", L"\\\\server"); + + test_remove_namespace(L"\\\\server\\C$\\folder", L"\\\\server\\C$\\folder"); + test_remove_namespace(L"\\\\server\\C$", L"\\\\server\\C$"); + test_remove_namespace(L"\\\\server\\", L"\\\\server"); + test_remove_namespace(L"\\\\server", L"\\\\server"); + + test_remove_namespace(L"C:\\Foo\\Bar", L"C:\\Foo\\Bar"); + test_remove_namespace(L"C:\\", L"C:\\"); + test_remove_namespace(L"", L""); + } void test_path_win32__canonicalize(void) |