[libxml2] Add a couple of XPath tests



commit 342658a132dddc6f2d72f83070e55a545a5c1608
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Sun Mar 8 16:46:04 2015 +0100

    Add a couple of XPath tests

 result/XPath/tests/simplebase |   46 +++++++++++++++++++++++++++++++++++++++++
 test/XPath/tests/simplebase   |    5 ++++
 2 files changed, 51 insertions(+), 0 deletions(-)
---
diff --git a/result/XPath/tests/simplebase b/result/XPath/tests/simplebase
index 980d18e..3c32d17 100644
--- a/result/XPath/tests/simplebase
+++ b/result/XPath/tests/simplebase
@@ -60,6 +60,19 @@ Set contains 3 nodes:
     content=   
 
 ========================
+Expression: /child::EXAMPLE/attribute::prop1/self::node()
+Object is a Node Set :
+Set contains 1 nodes:
+1  ATTRIBUTE prop1
+    TEXT
+      content=gnome is great
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/self::*
+Object is a Node Set :
+Set contains 0 nodes:
+
+========================
 Expression: /child::EXAMPLE/attribute::prop1/descendant-or-self::node()
 Object is a Node Set :
 Set contains 1 nodes:
@@ -68,6 +81,39 @@ Set contains 1 nodes:
       content=gnome is great
 
 ========================
+Expression: /child::EXAMPLE/attribute::prop1/descendant-or-self::*
+Object is a Node Set :
+Set contains 0 nodes:
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/ancestor-or-self::node()
+Object is a Node Set :
+Set contains 3 nodes:
+1   /
+2  ELEMENT EXAMPLE
+    ATTRIBUTE prop1
+      TEXT
+        content=gnome is great
+    ATTRIBUTE prop2
+      TEXT
+        content=& linux too
+3  ATTRIBUTE prop1
+    TEXT
+      content=gnome is great
+
+========================
+Expression: /child::EXAMPLE/attribute::prop1/ancestor-or-self::*
+Object is a Node Set :
+Set contains 1 nodes:
+1  ELEMENT EXAMPLE
+    ATTRIBUTE prop1
+      TEXT
+        content=gnome is great
+    ATTRIBUTE prop2
+      TEXT
+        content=& linux too
+
+========================
 Expression: /descendant::title
 Object is a Node Set :
 Set contains 2 nodes:
diff --git a/test/XPath/tests/simplebase b/test/XPath/tests/simplebase
index 9a1476e..8b2c7d1 100644
--- a/test/XPath/tests/simplebase
+++ b/test/XPath/tests/simplebase
@@ -5,6 +5,11 @@
 /child::EXAMPLE/child::head/child::title
 /child::EXAMPLE/child::head/child::title/child::text()
 /child::EXAMPLE/child::head/node()
+/child::EXAMPLE/attribute::prop1/self::node()
+/child::EXAMPLE/attribute::prop1/self::*
 /child::EXAMPLE/attribute::prop1/descendant-or-self::node()
+/child::EXAMPLE/attribute::prop1/descendant-or-self::*
+/child::EXAMPLE/attribute::prop1/ancestor-or-self::node()
+/child::EXAMPLE/attribute::prop1/ancestor-or-self::*
 /descendant::title
 /descendant::p/ancestor::chapter


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]