ObjFW  Diff

Differences From Artifact [739f4f2baa]:

To Artifact [6eea30c03b]:


164
165
166
167
168
169
170


171
172


173
174
175
176
177










178
164
165
166
167
168
169
170
171
172
173
174
175
176





177
178
179
180
181
182
183
184
185
186
187







+
+


+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+

	    _testFileIRI.fileSystemRepresentation, nil]));
}

- (void)testChangeCurrentDirectoryPath
{
	OFString *oldDirectoryPath = _fileManager.currentDirectoryPath;

	OTAssertFalse([_fileManager fileExistsAtPath: @"test.txt"]);

	[_fileManager changeCurrentDirectoryPath:
	    _testsDirectoryIRI.fileSystemRepresentation];
	@try {
		/*
	OTAssertEqualObjects(_fileManager.currentDirectoryPath,
	    _testsDirectoryIRI.fileSystemRepresentation);

	[_fileManager changeCurrentDirectoryPath: oldDirectoryPath];
}
		 * We can't check whether currentDirectoryPath is
		 * _testsDirectoryIRI.fileSystemRepresentation because they
		 * could be different due to symlinks. Therefore check for
		 * presence of test.txt instead.
		 */
		OTAssertTrue([_fileManager fileExistsAtPath: @"test.txt"]);
	} @finally {
		[_fileManager changeCurrentDirectoryPath: oldDirectoryPath];
	}
}
@end