mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-28 03:00:51 +00:00
Allow CRLF and LF in NSXMLParser test
This commit is contained in:
parent
32eb5d2acd
commit
78d9f73a36
1 changed files with 6 additions and 5 deletions
|
@ -240,6 +240,8 @@ static BOOL setShouldResolveExternalEntities = NO;
|
||||||
static BOOL
|
static BOOL
|
||||||
testParser(NSXMLParser *parser, NSString *expect)
|
testParser(NSXMLParser *parser, NSString *expect)
|
||||||
{
|
{
|
||||||
|
NSString *convertWin;
|
||||||
|
NSString *desc;
|
||||||
Handler *handler;
|
Handler *handler;
|
||||||
|
|
||||||
[parser setShouldProcessNamespaces: setShouldProcessNamespaces];
|
[parser setShouldProcessNamespaces: setShouldProcessNamespaces];
|
||||||
|
@ -257,13 +259,12 @@ testParser(NSXMLParser *parser, NSString *expect)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
|
||||||
/* Replace CRLF from result files with LF
|
/* Replace CRLF from result files with LF
|
||||||
*/
|
*/
|
||||||
expect = [expect stringByReplacingOccurrencesOfString: @"\r\n" withString: @"\n"];
|
convertWin = [expect stringByReplacingOccurrencesOfString: @"\r\n" withString: @"\n"];
|
||||||
#endif
|
desc = [handler description];
|
||||||
|
|
||||||
if (NO == [[handler description] isEqual: expect])
|
if (NO == [desc isEqual: expect] && NO == [desc isEqual: convertWin])
|
||||||
{
|
{
|
||||||
NSLog(@"######## Expected:\n%@\n######## Parsed:\n%@\n########\n",
|
NSLog(@"######## Expected:\n%@\n######## Parsed:\n%@\n########\n",
|
||||||
expect, [handler description]);
|
expect, [handler description]);
|
||||||
|
|
Loading…
Reference in a new issue