summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-10-17 08:48:43 -0700
committerEdward Thomson <ethomson@edwardthomson.com>2018-10-19 07:26:17 +0100
commitb2e85f982709b1dee4ab7206f83d56352b165e82 (patch)
treedda0feef36772112a1a5855d8fe1b9f2f54bc5f5 /tests
parent3f096ca56affd4870f6c3a5c1c045d2fb100de0d (diff)
downloadlibgit2-b2e85f982709b1dee4ab7206f83d56352b165e82.tar.gz
win32: rename `git_win32__canonicalize_path`
The internal API `git_win32__canonicalize_path` is far, far too easily confused with the internal API `git_win32_path_canonicalize`. The former removes the namespace prefix from a path (eg, given `\\?\C:\Temp\foo`, it returns `C:\Temp\foo`, and given `\\?\UNC\server\share`, it returns `\\server\share`). As such, rename it to `git_win32_path_remove_namespace`. `git_win32_path_canonicalize` remains unchanged.
Diffstat (limited to 'tests')
-rw-r--r--tests/path/win32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/path/win32.c b/tests/path/win32.c
index 36cb53767..ee87b706e 100644
--- a/tests/path/win32.c
+++ b/tests/path/win32.c
@@ -129,7 +129,7 @@ void test_path_win32__absolute_from_relative(void)
#endif
}
-void static test_canonicalize(const wchar_t *in, const wchar_t *expected)
+static void test_canonicalize(const wchar_t *in, const wchar_t *expected)
{
#ifdef GIT_WIN32
git_win32_path canonical;
@@ -145,7 +145,7 @@ void static test_canonicalize(const wchar_t *in, const wchar_t *expected)
#endif
}
-void static test_canonicalize_path(const wchar_t *in, const wchar_t *expected)
+static void test_remove_namespace(const wchar_t *in, const wchar_t *expected)
{
#ifdef GIT_WIN32
git_win32_path canonical;
@@ -153,7 +153,7 @@ void static test_canonicalize_path(const wchar_t *in, const wchar_t *expected)
cl_assert(wcslen(in) < MAX_PATH);
wcscpy(canonical, in);
- cl_must_pass(git_win32__canonicalize_path(canonical, wcslen(in)));
+ cl_must_pass(git_win32_path_remove_namespace(canonical, wcslen(in)));
cl_assert_equal_wcs(expected, canonical);
#else
GIT_UNUSED(in);
@@ -161,9 +161,9 @@ void static test_canonicalize_path(const wchar_t *in, const wchar_t *expected)
#endif
}
-void test_path_win32__canonicalize_path(void)
+void test_path_win32__remove_namespace(void)
{
- test_canonicalize_path(L"\\\\?\\UNC\\server\\C$\\folder", L"\\\\server\\C$\\folder");
+ test_remove_namespace(L"\\\\?\\UNC\\server\\C$\\folder", L"\\\\server\\C$\\folder");
}
void test_path_win32__canonicalize(void)