aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2015-03-08 16:46:04 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2015-03-08 16:46:04 +0100
commit342658a132dddc6f2d72f83070e55a545a5c1608 (patch)
tree57b231d47d4804a119336be7c6ac1d0696b483a7
parentba58f23c60862f2158b457f4d30031761bf4dde1 (diff)
downloadandroid_external_libxml2-342658a132dddc6f2d72f83070e55a545a5c1608.tar.gz
android_external_libxml2-342658a132dddc6f2d72f83070e55a545a5c1608.tar.bz2
android_external_libxml2-342658a132dddc6f2d72f83070e55a545a5c1608.zip
Add a couple of XPath tests
-rw-r--r--result/XPath/tests/simplebase46
-rw-r--r--test/XPath/tests/simplebase5
2 files changed, 51 insertions, 0 deletions
diff --git a/result/XPath/tests/simplebase b/result/XPath/tests/simplebase
index 980d18ef..3c32d17e 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 9a1476e6..8b2c7d15 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