summaryrefslogtreecommitdiff
path: root/t/13axisparent.t
diff options
context:
space:
mode:
Diffstat (limited to 't/13axisparent.t')
-rw-r--r--t/13axisparent.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/13axisparent.t b/t/13axisparent.t
new file mode 100644
index 0000000..21d7706
--- /dev/null
+++ b/t/13axisparent.t
@@ -0,0 +1,19 @@
+use Test;
+BEGIN { plan tests => 4 }
+
+use XML::XPath;
+ok(1);
+
+my $xp = XML::XPath->new(ioref => *DATA);
+ok($xp);
+
+my @nodes;
+@nodes = $xp->findnodes('//DDD/parent::*');
+ok(@nodes, 4);
+ok($nodes[3]->getName, "EEE");
+
+__DATA__
+<AAA>
+<BBB><DDD><CCC><DDD/><EEE/></CCC></DDD></BBB>
+<CCC><DDD><EEE><DDD><FFF/></DDD></EEE></DDD></CCC>
+</AAA>