mirror of
https://github.com/CocoaLumberjack/CocoaLumberjack.git
synced 2026-05-07 20:12:46 +00:00
Add two more checks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user