mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 00:11:04 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@32970 72102866-910b-0410-8b05-ffd578937521
31 lines
943 B
Objective-C
31 lines
943 B
Objective-C
#if defined(GNUSTEP_BASE_LIBRARY)
|
|
#import <Foundation/Foundation.h>
|
|
#import <GNUstepBase/GSMime.h>
|
|
#import "Testing.h"
|
|
int main(int argc,char **argv)
|
|
{
|
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
|
NSString *data = nil;
|
|
GSMimeDocument *doc = [[GSMimeDocument alloc] init];
|
|
NSMutableDictionary *par = [[NSMutableDictionary alloc] init];
|
|
[par setObject: @"my/type" forKey: @"type"];
|
|
[doc setContent: @"Hello\r\n"];
|
|
[doc setHeader: [[GSMimeHeader alloc] initWithName: @"content-type"
|
|
value: @"text/plain"
|
|
parameters: par]];
|
|
|
|
[doc setHeader: [[GSMimeHeader alloc] initWithName: @"content-transfer-encoding"
|
|
value: @"binary"
|
|
parameters: nil]];
|
|
|
|
data = [NSData dataWithContentsOfFile: @"mime8.dat"];
|
|
PASS([[doc rawMimeData] isEqual: data], "Can make a simple document");
|
|
[arp release]; arp = nil;
|
|
return 0;
|
|
}
|
|
#else
|
|
int main(int argc,char **argv)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|