Add two more checks

This commit is contained in:
Florian Friedrich
2025-03-14 08:55:26 +01:00
parent b78b42e80a
commit d08749be5d
@@ -121,6 +121,7 @@ static const DDLogLevel ddLogLevel = DDLogLevelAll;
[DDLog addLogger:logger];
DDLogError(@"Some log in the old file");
__auto_type oldLogFileInfo = [logger currentLogFileInfo];
XCTAssertNotNil(oldLogFileInfo);
__auto_type expectation = [self expectationWithDescription:@"Waiting for the log file to be rolled"];
[logger rollLogFileWithCompletionBlock:^{
[expectation fulfill];
@@ -130,6 +131,7 @@ static const DDLogLevel ddLogLevel = DDLogLevelAll;
}];
DDLogError(@"Some log in the new file");
__auto_type newLogFileInfo = [logger currentLogFileInfo];
XCTAssertNotNil(newLogFileInfo);
XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:oldLogFileInfo.filePath]);
XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:newLogFileInfo.filePath]);
__auto_type oldString = [NSString stringWithContentsOfFile:oldLogFileInfo.filePath