2016-09-19 15:51:48 +00:00
|
|
|
#if defined(GNUSTEP_BASE_LIBRARY)
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <GNUstepBase/GSMime.h>
|
|
|
|
#import "Testing.h"
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
|
|
|
NSString *xml = @"<?xml version=\"1.0\" encoding=\"UTF-8\"?><html></html>";
|
|
|
|
NSString *charset = nil;
|
2016-09-19 15:56:51 +00:00
|
|
|
PASS_RUNS(charset = [GSMimeDocument charsetForXml: xml], "Can determine charset of xml document.");
|
|
|
|
PASS_EQUAL(@"UTF-8", charset, "Charset detected correctly");
|
2016-09-19 15:51:48 +00:00
|
|
|
DESTROY(arp);
|
2016-09-19 15:56:51 +00:00
|
|
|
return 0;
|
2016-09-19 15:51:48 +00:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
int main(int argc,char **argv)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|