From d5434fcb7b1c5cfe2209ed123be621538f993f56 Mon Sep 17 00:00:00 2001 From: Todd Ditchendorf Date: Fri, 4 Jul 2014 13:15:36 -0500 Subject: [PATCH] * tests --- test/XPLocationPathLibxmlTest.m | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/XPLocationPathLibxmlTest.m b/test/XPLocationPathLibxmlTest.m index df815d8..e52d1a5 100644 --- a/test/XPLocationPathLibxmlTest.m +++ b/test/XPLocationPathLibxmlTest.m @@ -2228,6 +2228,31 @@ - (void)testChapterSlashTitleExceptChapterSlashTitle { } +- (void)testOpenChapterSlashTitleClosePredicate2ExceptOpenChapterSlashTitleCloasePredicate1 { + [self eval:@"(chapter/title)[2] except (chapter/title)[1]"]; + + id enm = [_res enumerate]; + + for (NSUInteger i = 1; i < 2; ++i) { + id node = [enm nextObject]; + TDEqualObjects(@"title", node.name); + TDEquals(XPNodeTypeElement, node.nodeType); + TDEqualObjects(_titles[i], node.stringValue); + } + + TDFalse([enm hasMoreObjects]); +} + + +- (void)testOpenChapterSlashTitleClosePredicate2ExceptOpenChapterSlashTitleCloasePredicate2 { + [self eval:@"(chapter/title)[2] except (chapter/title)[2]"]; + + id enm = [_res enumerate]; + + TDFalse([enm hasMoreObjects]); +} + + - (void)testChapterSlashTitleIntersectChapterPredicate1SlashTitle { [self eval:@"chapter/title intersect chapter[1]/title"];