diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-03-08 16:34:23 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-03-08 18:23:29 +0000 |
| commit | fb7da15452f7069e6bfa7d39b7703e32eaa84d34 (patch) | |
| tree | f9e362f6360ae0232eb5ff0f9d1fed4d2249b993 /tests/path | |
| parent | e23b8b446522f17eb3329b62201aae7674f06e13 (diff) | |
| download | libgit2-fb7da15452f7069e6bfa7d39b7703e32eaa84d34.tar.gz | |
win32: clarify usage of path canonicalization funcs
The path canonicalization functions on win32 are intended to
canonicalize absolute paths; those with prefixes. In other words,
things start with drive letters (`C:\`), share names (`\\server\share`),
or other prefixes (`\\?\`).
This function removes leading `..` that occur after the prefix but
before the directory/file portion (eg, turning `C:\..\..\..\foo` into
`C:\foo`). This translation is not appropriate for local paths.
Diffstat (limited to 'tests/path')
| -rw-r--r-- | tests/path/win32.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/path/win32.c b/tests/path/win32.c index 3ed7d7a6a..347de8f43 100644 --- a/tests/path/win32.c +++ b/tests/path/win32.c @@ -203,16 +203,6 @@ void test_path_win32__canonicalize(void) test_canonicalize(L"C:/Foo/Bar", L"C:\\Foo\\Bar"); test_canonicalize(L"C:/", L"C:\\"); - test_canonicalize(L"Foo\\\\Bar\\\\Asdf\\\\", L"Foo\\Bar\\Asdf"); - test_canonicalize(L"Foo\\\\Bar\\\\..\\\\Asdf\\", L"Foo\\Asdf"); - test_canonicalize(L"Foo\\\\Bar\\\\.\\\\Asdf\\", L"Foo\\Bar\\Asdf"); - test_canonicalize(L"Foo\\\\..\\Bar\\\\.\\\\Asdf\\", L"Bar\\Asdf"); - test_canonicalize(L"\\", L""); - test_canonicalize(L"", L""); - test_canonicalize(L"Foo\\..\\..\\..\\..", L""); - test_canonicalize(L"..\\..\\..\\..", L""); - test_canonicalize(L"\\..\\..\\..\\..", L""); - test_canonicalize(L"\\\\?\\C:\\Foo\\Bar", L"\\\\?\\C:\\Foo\\Bar"); test_canonicalize(L"\\\\?\\C:\\Foo\\Bar\\", L"\\\\?\\C:\\Foo\\Bar"); test_canonicalize(L"\\\\?\\C:\\\\Foo\\.\\Bar\\\\..\\", L"\\\\?\\C:\\Foo"); |
