diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-10-17 11:34:38 -0700 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-10-19 07:26:17 +0100 |
commit | 16fd9ba9379c0cbf0931f9486980353b5a28fda9 (patch) | |
tree | 3d668fcbdee55cae7936a8530e5b31389026c59b | |
parent | b2e85f982709b1dee4ab7206f83d56352b165e82 (diff) | |
download | libgit2-16fd9ba9379c0cbf0931f9486980353b5a28fda9.tar.gz |
win32: more tests for `git_win32_remove_path`
-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) |