mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Add Yavor Doganov's patches for tests and config. Add fixes for GSXML
validation of xml documents
This commit is contained in:
parent
31257785d6
commit
925f1dd5e1
19 changed files with 260 additions and 98 deletions
|
@ -2,10 +2,15 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSXMLDocument.h>
|
||||
#import <Foundation/NSXMLElement.h>
|
||||
#import "GNUstepBase/GSConfig.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
START_SET("NSXMLDocument")
|
||||
#if !GS_USE_LIBXML
|
||||
SKIP("library built without libxml2")
|
||||
#else
|
||||
NSArray *nodes = nil;
|
||||
NSXMLDocument *node;
|
||||
NSXMLDocument *node2;
|
||||
|
@ -91,7 +96,9 @@ int main()
|
|||
error:NULL];
|
||||
PASS([node isEqual: node2],
|
||||
"Equal documents are equivalent");
|
||||
#endif
|
||||
|
||||
END_SET("NSXMLDocument")
|
||||
[arp release];
|
||||
arp = nil;
|
||||
|
||||
|
|
|
@ -2,10 +2,15 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSXMLDocument.h>
|
||||
#import <Foundation/NSXMLElement.h>
|
||||
#import "GNUstepBase/GSConfig.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
START_SET("NSXMLDocument CDATA")
|
||||
#if !GS_USE_LIBXML
|
||||
SKIP("library built without libxml2")
|
||||
#else
|
||||
NSString *docString = @"<root><node><![CDATA[How to read this text ?]]></node></root>";
|
||||
NSData *data = [docString dataUsingEncoding: NSUTF8StringEncoding];
|
||||
NSError *outError = nil;
|
||||
|
@ -17,7 +22,9 @@ int main()
|
|||
NSXMLNode *childNode = [rootElement childAtIndex: 0];
|
||||
NSString *cData = [childNode stringValue];
|
||||
PASS_EQUAL(cData, @"How to read this text ?", "CDATA element is correct");
|
||||
#endif
|
||||
|
||||
END_SET("NSXMLDocument CDATA")
|
||||
[arp release];
|
||||
arp = nil;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue