mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Fix NSURL path on Windows for UNC paths
This commit is contained in:
parent
f0e33a48d5
commit
48c8a1a6a1
3 changed files with 29 additions and 13 deletions
|
@ -105,6 +105,16 @@ int main()
|
|||
"File URL C:\\WINDOWS is file:///C:%%5CWINDOWS/");
|
||||
PASS_EQUAL([url resourceSpecifier], @"/C:%5CWINDOWS/",
|
||||
"resourceSpecifier of C:\\WINDOWS is /C:%5CWINDOWS/");
|
||||
|
||||
// UNC path
|
||||
url = [NSURL fileURLWithPath: @"\\\\SERVER\\SHARE\\"];
|
||||
str = [url path];
|
||||
PASS_EQUAL(str, @"\\\\SERVER\\SHARE\\",
|
||||
"Path of file URL \\\\SERVER\\SHARE\\ is \\\\SERVER\\SHARE\\");
|
||||
PASS_EQUAL([url description], @"file:///%5C%5CSERVER%5CSHARE%5C",
|
||||
"File URL \\\\SERVER\\SHARE\\ is file:///%5C%5CSERVER%5CSHARE%5C");
|
||||
PASS_EQUAL([url resourceSpecifier], @"/%5C%5CSERVER%5CSHARE%5C",
|
||||
"resourceSpecifier of \\\\SERVER\\SHARE\\ is /%5C%5CSERVER%5CSHARE%5C");
|
||||
#else
|
||||
url = [NSURL fileURLWithPath: @"/usr"];
|
||||
str = [url path];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue