ObjFW  Check-in [897aa8244d]

Overview
Comment:Fix OFFileManagerTests on macOS
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 897aa8244d32c687787841df7475d49fff0b291c4e9d4ef25e78a47ac70e2e97
User & Date: js on 2024-03-16 22:14:37
Other Links: manifest | tags
References
2024-03-17
09:45 Fixed ticket [3e6dc8e381]: Tests for OFFileIRIHandler plus 4 other changes artifact: d470775856 user: js
Context
2024-03-17
08:56
OFFileManagerTests: Add more tests check-in: 150b8f07af user: js tags: trunk
2024-03-16
22:14
Fix OFFileManagerTests on macOS check-in: 897aa8244d user: js tags: trunk
19:48
Add OFFileManagerTests check-in: ccace0f0e0 user: js tags: trunk
Changes

Modified tests/OFFileManagerTests.m from [739f4f2baa] to [6eea30c03b].

164
165
166
167
168
169
170


171
172


173
174
175




176

177
178
	    _testFileIRI.fileSystemRepresentation, nil]));
}

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



	[_fileManager changeCurrentDirectoryPath:
	    _testsDirectoryIRI.fileSystemRepresentation];


	OTAssertEqualObjects(_fileManager.currentDirectoryPath,
	    _testsDirectoryIRI.fileSystemRepresentation);





	[_fileManager changeCurrentDirectoryPath: oldDirectoryPath];

}
@end







>
>


>
>
|
|
|
>
>
>
>
|
>


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 {
		/*
		 * 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