mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Update GSXML unit test to use NSURL APIs
This commit is contained in:
parent
baf1bb9f73
commit
ffe938c49e
1 changed files with 7 additions and 2 deletions
|
@ -16,6 +16,8 @@ int main()
|
|||
GSXMLNode *node;
|
||||
GSXMLRPC *rpc;
|
||||
NSString *str;
|
||||
NSString *testPath;
|
||||
NSString *absolutePath;
|
||||
NSData *dat;
|
||||
|
||||
TEST_FOR_CLASS(@"GSXMLDocument",[GSXMLDocument alloc],
|
||||
|
@ -149,13 +151,16 @@ int main()
|
|||
"Can parse a method call with a date");
|
||||
|
||||
mgr = [NSFileManager defaultManager];
|
||||
testPath = [[mgr currentDirectoryPath]
|
||||
stringByAppendingPathComponent: @"GNUmakefile"];
|
||||
absolutePath = [[NSURL fileURLWithPath: testPath] absoluteString];
|
||||
|
||||
str = [NSString stringWithFormat:
|
||||
@"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
|
||||
@"<!DOCTYPE foo [\n"
|
||||
@"<!ENTITY foo SYSTEM \"file://%@/GNUmakefile\">\n"
|
||||
@"<!ENTITY foo SYSTEM \"%@\">\n"
|
||||
@"]>\n"
|
||||
@"<file>&&foo;A</file>", [mgr currentDirectoryPath]];
|
||||
@"<file>&&foo;A</file>", absolutePath];
|
||||
|
||||
parser = [GSXMLParser parserWithData:
|
||||
[str dataUsingEncoding: NSUTF8StringEncoding]];
|
||||
|
|
Loading…
Reference in a new issue