Updated submodule

Updated writing test to actually test something
This commit is contained in:
michael starke
2013-08-20 22:30:09 +02:00
parent e8124b0415
commit 30a5f1d0b0
3 changed files with 33 additions and 8 deletions

View File

@@ -19,7 +19,16 @@
KPKTree *tree = [[KPKTree alloc] initWithData:data password:password error:&error];
error = nil;
NSData *saveData = [tree encryptWithPassword:password forVersion:KPKXmlVersion error:&error];
//[saveData writeToFile:@"CustomIcon_Password_1234_save.kdbx" atomically:YES];
STAssertNotNil(saveData, @"Serialization should yield data");
NSString *tempFile = [NSTemporaryDirectory() stringByAppendingString:@"CustomIcon_Password_1234_save.kdbx"];
NSLog(@"Saved file to %@", tempFile);
[saveData writeToFile:tempFile atomically:YES];
error = nil;
NSURL *url = [NSURL fileURLWithPath:tempFile];
KPKTree *reloadedTree = [[KPKTree alloc] initWithContentsOfUrl:url password:password error:&error];
STAssertNotNil(reloadedTree, @"Reloaded tree should not be nil");
re
}
- (NSData *)_loadTestDataBase:(NSString *)name extension:(NSString *)extension {