Test case for extracting charset from xml string data

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40089 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2016-09-19 15:51:48 +00:00
parent ef5fd8a497
commit f5641389f0

View file

@ -0,0 +1,20 @@
#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;
testHopeful = YES;
PASS_RUNS(charset = [GSMimeDocument charsetForXml: xml], "Can determine cahrset of xml document.");
DESTROY(arp);
}
#else
int main(int argc,char **argv)
{
return 0;
}
#endif