mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-05 22:20:59 +00:00
of PASS. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36617 72102866-910b-0410-8b05-ffd578937521
37 lines
1.1 KiB
Objective-C
37 lines
1.1 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
#import "Testing.h"
|
|
#import "ObjectTesting.h"
|
|
|
|
int main(int argc, const char **argv)
|
|
{
|
|
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
|
|
|
const unichar EszettChar = 0x00df;
|
|
NSString *EszettStr = [[[NSString alloc] initWithCharacters: &EszettChar
|
|
length: 1] autorelease];
|
|
|
|
{
|
|
NSData *data = [NSKeyedArchiver archivedDataWithRootObject: EszettStr];
|
|
NSString *unarchivedString = [NSKeyedUnarchiver unarchiveObjectWithData: data];
|
|
|
|
PASS_EQUAL(unarchivedString, EszettStr,
|
|
"'eszett' character roundtrip to binary plist seems to work.");
|
|
}
|
|
|
|
{
|
|
NSString *plist1String = [NSKeyedUnarchiver unarchiveObjectWithFile: @"eszett1.plist"];
|
|
|
|
PASS_EQUAL(plist1String, EszettStr,
|
|
"'eszett' character read from OSX binary plist");
|
|
}
|
|
|
|
{
|
|
NSString *plist2String = [NSKeyedUnarchiver unarchiveObjectWithFile: @"eszett2.plist"];
|
|
|
|
PASS_EQUAL(plist2String, EszettStr,
|
|
"'eszett' character read from GNUstep binary plist");
|
|
}
|
|
|
|
[pool release];
|
|
return 0;
|
|
}
|