117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
-
+
-
+
+
-
+
|
isEqual: [[OFFileManager defaultManager].currentDirectoryPath
stringByAppendingPathComponent: @"testfile.txt"]])
# if defined(OF_WINDOWS) || defined(OF_MSDOS)
OFURI *tmp;
TEST(@"+[fileURIWithPath:] for c:\\",
(tmp = [OFURI fileURIWithPath: @"c:\\"]) &&
[tmp.string isEqual: @"file:///c:/"] &&
[tmp.string isEqual: @"file:/c:/"] &&
[tmp.fileSystemRepresentation isEqual: @"c:\\"])
# endif
# ifdef OF_WINDOWS
TEST(@"+[fileURIWithPath:] with UNC",
(tmp = [OFURI fileURIWithPath: @"\\\\foo\\bar"]) &&
(tmp = [OFURI fileURIWithPath: @"\\\\foo\\bar"
isDirectory: false]) &&
[tmp.host isEqual: @"foo"] && [tmp.path isEqual: @"/bar"] &&
[tmp.string isEqual: @"file://foo/bar"] &&
[tmp.fileSystemRepresentation isEqual: @"\\\\foo\\bar"] &&
(tmp = [OFURI fileURIWithPath: @"\\\\test"]) &&
(tmp = [OFURI fileURIWithPath: @"\\\\test" isDirectory: true]) &&
[tmp.host isEqual: @"test"] && [tmp.path isEqual: @"/"] &&
[tmp.string isEqual: @"file://test/"] &&
[tmp.fileSystemRepresentation isEqual: @"\\\\test"])
# endif
#endif
TEST(@"-[string]",
|