summaryrefslogtreecommitdiffstats
path: root/libxml2/result/XPath/expr
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-10-19 18:22:05 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-10-19 18:22:05 (GMT)
commit34be72f9ed749a5c013d3f7f47d810e8caf652cb (patch)
tree2f75b6050c088da53d774b3da3fb71e7fa49ec78 /libxml2/result/XPath/expr
parent604eac5688c5d437ed6d585ee63e53fba6f558c0 (diff)
parent0f851b6f17365c29b56d6a17564d58a33120508a (diff)
downloadblt-34be72f9ed749a5c013d3f7f47d810e8caf652cb.zip
blt-34be72f9ed749a5c013d3f7f47d810e8caf652cb.tar.gz
blt-34be72f9ed749a5c013d3f7f47d810e8caf652cb.tar.bz2
Merge commit '0f851b6f17365c29b56d6a17564d58a33120508a' as 'libxml2'
Diffstat (limited to 'libxml2/result/XPath/expr')
-rw-r--r--libxml2/result/XPath/expr/base28
-rw-r--r--libxml2/result/XPath/expr/compare184
-rw-r--r--libxml2/result/XPath/expr/equality104
-rw-r--r--libxml2/result/XPath/expr/floats244
-rw-r--r--libxml2/result/XPath/expr/functions100
-rw-r--r--libxml2/result/XPath/expr/strings136
6 files changed, 796 insertions, 0 deletions
diff --git a/libxml2/result/XPath/expr/base b/libxml2/result/XPath/expr/base
new file mode 100644
index 0000000..e04346f
--- /dev/null
+++ b/libxml2/result/XPath/expr/base
@@ -0,0 +1,28 @@
+
+========================
+Expression: 1
+Object is a number : 1
+
+========================
+Expression: 1+2
+Object is a number : 3
+
+========================
+Expression: 2*3
+Object is a number : 6
+
+========================
+Expression: 1+2*3+4
+Object is a number : 11
+
+========================
+Expression: (1+2)*(3+4)
+Object is a number : 21
+
+========================
+Expression: 1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1+1*1
+Object is a number : 21
+
+========================
+Expression: self::-name
+Object is empty (NULL)
diff --git a/libxml2/result/XPath/expr/compare b/libxml2/result/XPath/expr/compare
new file mode 100644
index 0000000..21a88d0
--- /dev/null
+++ b/libxml2/result/XPath/expr/compare
@@ -0,0 +1,184 @@
+
+========================
+Expression: 0<0
+Object is a Boolean : false
+
+========================
+Expression: 0<=0
+Object is a Boolean : true
+
+========================
+Expression: 0>0
+Object is a Boolean : false
+
+========================
+Expression: 0>=0
+Object is a Boolean : true
+
+========================
+Expression: 0<1
+Object is a Boolean : true
+
+========================
+Expression: 0<=1
+Object is a Boolean : true
+
+========================
+Expression: 0>1
+Object is a Boolean : false
+
+========================
+Expression: 0>=1
+Object is a Boolean : false
+
+========================
+Expression: 1<0
+Object is a Boolean : false
+
+========================
+Expression: 1<=0
+Object is a Boolean : false
+
+========================
+Expression: 1>0
+Object is a Boolean : true
+
+========================
+Expression: 1>=0
+Object is a Boolean : true
+
+========================
+Expression: 1<1
+Object is a Boolean : false
+
+========================
+Expression: 1<=1
+Object is a Boolean : true
+
+========================
+Expression: 1>1
+Object is a Boolean : false
+
+========================
+Expression: 1>=1
+Object is a Boolean : true
+
+========================
+Expression: '0'<1
+Object is a Boolean : true
+
+========================
+Expression: '0'<=1
+Object is a Boolean : true
+
+========================
+Expression: '0'>1
+Object is a Boolean : false
+
+========================
+Expression: '0'>=1
+Object is a Boolean : false
+
+========================
+Expression: 0<'1.2'
+Object is a Boolean : true
+
+========================
+Expression: 0<='1.2'
+Object is a Boolean : true
+
+========================
+Expression: 0>'1.2'
+Object is a Boolean : false
+
+========================
+Expression: 0>='1.2'
+Object is a Boolean : false
+
+========================
+Expression: 0<'-0.2'
+Object is a Boolean : false
+
+========================
+Expression: 0<='-0.2'
+Object is a Boolean : false
+
+========================
+Expression: 0>'-0.2'
+Object is a Boolean : true
+
+========================
+Expression: 0>='-0.2'
+Object is a Boolean : true
+
+========================
+Expression: false()<1
+Object is a Boolean : true
+
+========================
+Expression: false()<=1
+Object is a Boolean : true
+
+========================
+Expression: 0>true()
+Object is a Boolean : false
+
+========================
+Expression: 0>=true()
+Object is a Boolean : false
+
+========================
+Expression: 'a' > 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' > 'b'
+Object is a Boolean : false
+
+========================
+Expression: 'b' > 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' < 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' < 'b'
+Object is a Boolean : false
+
+========================
+Expression: 'b' < 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' >= 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' >= 'b'
+Object is a Boolean : false
+
+========================
+Expression: 'b' >= 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' <= 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' <= 'b'
+Object is a Boolean : false
+
+========================
+Expression: 'b' <= 'a'
+Object is a Boolean : false
+
+========================
+Expression: 'a' > '0.0'
+Object is a Boolean : false
+
+========================
+Expression: 'a' < '0.0'
+Object is a Boolean : false
diff --git a/libxml2/result/XPath/expr/equality b/libxml2/result/XPath/expr/equality
new file mode 100644
index 0000000..44b4c22
--- /dev/null
+++ b/libxml2/result/XPath/expr/equality
@@ -0,0 +1,104 @@
+
+========================
+Expression: 1=1
+Object is a Boolean : true
+
+========================
+Expression: 1!=1
+Object is a Boolean : false
+
+========================
+Expression: 1=0
+Object is a Boolean : false
+
+========================
+Expression: 1!=0
+Object is a Boolean : true
+
+========================
+Expression: true()=true()
+Object is a Boolean : true
+
+========================
+Expression: true()!=true()
+Object is a Boolean : false
+
+========================
+Expression: true()=false()
+Object is a Boolean : false
+
+========================
+Expression: false()!=true()
+Object is a Boolean : true
+
+========================
+Expression: 'test'='test'
+Object is a Boolean : true
+
+========================
+Expression: 'test'!='test'
+Object is a Boolean : false
+
+========================
+Expression: 'test2'='test'
+Object is a Boolean : false
+
+========================
+Expression: 'test2'!='test'
+Object is a Boolean : true
+
+========================
+Expression: false()=0
+Object is a Boolean : true
+
+========================
+Expression: false()!=0
+Object is a Boolean : false
+
+========================
+Expression: false()=1
+Object is a Boolean : false
+
+========================
+Expression: false()!=1
+Object is a Boolean : true
+
+========================
+Expression: 0=true()
+Object is a Boolean : false
+
+========================
+Expression: 0!=true()
+Object is a Boolean : true
+
+========================
+Expression: 1=true()
+Object is a Boolean : true
+
+========================
+Expression: 1!=true()
+Object is a Boolean : false
+
+========================
+Expression: true()='test'
+Object is a Boolean : true
+
+========================
+Expression: false()='test'
+Object is a Boolean : false
+
+========================
+Expression: 'test'!=true()
+Object is a Boolean : false
+
+========================
+Expression: 'test'!=false()
+Object is a Boolean : true
+
+========================
+Expression: 'a'=0.0
+Object is a Boolean : false
+
+========================
+Expression: 'a'!=0.0
+Object is a Boolean : true
diff --git a/libxml2/result/XPath/expr/floats b/libxml2/result/XPath/expr/floats
new file mode 100644
index 0000000..b6255ce
--- /dev/null
+++ b/libxml2/result/XPath/expr/floats
@@ -0,0 +1,244 @@
+
+========================
+Expression: 1
+Object is a number : 1
+
+========================
+Expression: 123
+Object is a number : 123
+
+========================
+Expression: 1.23
+Object is a number : 1.23
+
+========================
+Expression: 0.123
+Object is a number : 0.123
+
+========================
+Expression: 4.
+Object is a number : 4
+
+========================
+Expression: .4
+Object is a number : 0.4
+
+========================
+Expression: 1.23e3
+Object is a number : 1230
+
+========================
+Expression: 1.23e-3
+Object is a number : 0.00123
+
+========================
+Expression: 1 div 0
+Object is a number : Infinity
+
+========================
+Expression: -1 div 0
+Object is a number : -Infinity
+
+========================
+Expression: 0 div 0
+Object is a number : NaN
+
+========================
+Expression: 1 div -0
+Object is a number : -Infinity
+
+========================
+Expression: (1 div 0) > 0
+Object is a Boolean : true
+
+========================
+Expression: (1 div 0) < 0
+Object is a Boolean : false
+
+========================
+Expression: (-1 div 0) > 0
+Object is a Boolean : false
+
+========================
+Expression: (-1 div 0) < 0
+Object is a Boolean : true
+
+========================
+Expression: (0 div 0) > 0
+Object is a Boolean : false
+
+========================
+Expression: (0 div 0) < 0
+Object is a Boolean : false
+
+========================
+Expression: (1 div -0) > 0
+Object is a Boolean : false
+
+========================
+Expression: (1 div -0) < 0
+Object is a Boolean : true
+
+========================
+Expression: 0 div 0 = 0 div 0
+Object is a Boolean : false
+
+========================
+Expression: 0 div 0 != 0 div 0
+Object is a Boolean : true
+
+========================
+Expression: 0 div 0 > 0 div 0
+Object is a Boolean : false
+
+========================
+Expression: 0 div 0 < 0 div 0
+Object is a Boolean : false
+
+========================
+Expression: 0 div 0 >= 0 div 0
+Object is a Boolean : false
+
+========================
+Expression: 0 div 0 <= 0 div 0
+Object is a Boolean : false
+
+========================
+Expression: 1 div 0 = -1 div 0
+Object is a Boolean : false
+
+========================
+Expression: 1 div 0 != -1 div 0
+Object is a Boolean : true
+
+========================
+Expression: 1 div 0 > -1 div 0
+Object is a Boolean : true
+
+========================
+Expression: 1 div 0 < -1 div 0
+Object is a Boolean : false
+
+========================
+Expression: 1 div 0 >= -1 div 0
+Object is a Boolean : true
+
+========================
+Expression: 1 div 0 <= -1 div 0
+Object is a Boolean : false
+
+========================
+Expression: 1 div 0 = 1 div 0
+Object is a Boolean : true
+
+========================
+Expression: 1 div 0 != 1 div 0
+Object is a Boolean : false
+
+========================
+Expression: 1 div 0 > 1 div 0
+Object is a Boolean : false
+
+========================
+Expression: 1 div 0 < 1 div 0
+Object is a Boolean : false
+
+========================
+Expression: 1 div 0 >= -1 div 0
+Object is a Boolean : true
+
+========================
+Expression: 1 div 0 <= -1 div 0
+Object is a Boolean : false
+
+========================
+Expression: -2 div 0 = -1 div 0
+Object is a Boolean : true
+
+========================
+Expression: 1 div floor(0.1)
+Object is a number : Infinity
+
+========================
+Expression: 1 div floor(-0.1)
+Object is a number : -1
+
+========================
+Expression: 1 div floor(-0)
+Object is a number : -Infinity
+
+========================
+Expression: 1 div floor(0)
+Object is a number : Infinity
+
+========================
+Expression: 1 div ceiling(0.1)
+Object is a number : 1
+
+========================
+Expression: 1 div ceiling(-0.1)
+Object is a number : -Infinity
+
+========================
+Expression: 1 div ceiling(-0)
+Object is a number : -Infinity
+
+========================
+Expression: 1 div ceiling(0)
+Object is a number : Infinity
+
+========================
+Expression: 1 div round(0.1)
+Object is a number : Infinity
+
+========================
+Expression: 1 div round(-0.1)
+Object is a number : -Infinity
+
+========================
+Expression: 1 div round(-0)
+Object is a number : -Infinity
+
+========================
+Expression: 1 div round(0)
+Object is a number : Infinity
+
+========================
+Expression: 1 div number('f')
+Object is a number : NaN
+
+========================
+Expression: number('f') div 1
+Object is a number : NaN
+
+========================
+Expression: 1 div (1 div 0)
+Object is a number : 0
+
+========================
+Expression: (1 div 0) div 1
+Object is a number : Infinity
+
+========================
+Expression: -(1 div 0) div 1
+Object is a number : -Infinity
+
+========================
+Expression: 5 mod 2
+Object is a number : 1
+
+========================
+Expression: 5 mod -2
+Object is a number : 1
+
+========================
+Expression: -5 mod 2
+Object is a number : -1
+
+========================
+Expression: -5 mod -2
+Object is a number : -1
+
+========================
+Expression: 8 mod 3 = 2
+Object is a Boolean : true
diff --git a/libxml2/result/XPath/expr/functions b/libxml2/result/XPath/expr/functions
new file mode 100644
index 0000000..10cc27e
--- /dev/null
+++ b/libxml2/result/XPath/expr/functions
@@ -0,0 +1,100 @@
+
+========================
+Expression: true()
+Object is a Boolean : true
+
+========================
+Expression: false()
+Object is a Boolean : false
+
+========================
+Expression: number("1.5")
+Object is a number : 1.5
+
+========================
+Expression: number('abc')
+Object is a number : NaN
+
+========================
+Expression: -number('abc')
+Object is a number : NaN
+
+========================
+Expression: floor(0.1)
+Object is a number : 0
+
+========================
+Expression: floor(-0.1)
+Object is a number : -1
+
+========================
+Expression: floor(-0)
+Object is a number : 0
+
+========================
+Expression: floor(0)
+Object is a number : 0
+
+========================
+Expression: floor(5.2)
+Object is a number : 5
+
+========================
+Expression: floor(-5.2)
+Object is a number : -6
+
+========================
+Expression: ceiling(0.1)
+Object is a number : 1
+
+========================
+Expression: ceiling(-0.1)
+Object is a number : 0
+
+========================
+Expression: ceiling(-0)
+Object is a number : 0
+
+========================
+Expression: ceiling(0)
+Object is a number : 0
+
+========================
+Expression: ceiling(5.2)
+Object is a number : 6
+
+========================
+Expression: ceiling(-5.2)
+Object is a number : -5
+
+========================
+Expression: round(0.1)
+Object is a number : 0
+
+========================
+Expression: round(5.2)
+Object is a number : 5
+
+========================
+Expression: round(5.5)
+Object is a number : 6
+
+========================
+Expression: round(5.6)
+Object is a number : 6
+
+========================
+Expression: round(-0.1)
+Object is a number : 0
+
+========================
+Expression: round(-5.2)
+Object is a number : -5
+
+========================
+Expression: round(-5.5)
+Object is a number : -5
+
+========================
+Expression: round(-5.6)
+Object is a number : -6
diff --git a/libxml2/result/XPath/expr/strings b/libxml2/result/XPath/expr/strings
new file mode 100644
index 0000000..fad7048
--- /dev/null
+++ b/libxml2/result/XPath/expr/strings
@@ -0,0 +1,136 @@
+
+========================
+Expression: string(5)
+Object is a string : 5
+
+========================
+Expression: string(0.5)
+Object is a string : 0.5
+
+========================
+Expression: string(-0.5)
+Object is a string : -0.5
+
+========================
+Expression: string(true())
+Object is a string : true
+
+========================
+Expression: string(false())
+Object is a string : false
+
+========================
+Expression: concat("titi","toto")
+Object is a string : tititoto
+
+========================
+Expression: concat("titi","toto","tata")
+Object is a string : tititototata
+
+========================
+Expression: concat("titi",'toto')
+Object is a string : tititoto
+
+========================
+Expression: concat("titi",'toto',"tata","last")
+Object is a string : tititototatalast
+
+========================
+Expression: starts-with("tititoto","titi")
+Object is a Boolean : true
+
+========================
+Expression: starts-with("tititoto","to")
+Object is a Boolean : false
+
+========================
+Expression: contains("tititototata","titi")
+Object is a Boolean : true
+
+========================
+Expression: contains("tititototata","toto")
+Object is a Boolean : true
+
+========================
+Expression: contains("tititototata","tata")
+Object is a Boolean : true
+
+========================
+Expression: contains("tititototata","tita")
+Object is a Boolean : false
+
+========================
+Expression: substring("12345",2,3)
+Object is a string : 234
+
+========================
+Expression: substring("12345",2)
+Object is a string : 2345
+
+========================
+Expression: substring("12345",-4)
+Object is a string : 12345
+
+========================
+Expression: substring("12345",3.4)
+Object is a string : 345
+
+========================
+Expression: substring("12345",3.6)
+Object is a string : 45
+
+========================
+Expression: substring("12345",1.5,2.6)
+Object is a string : 234
+
+========================
+Expression: substring("12345",2.2,2.2)
+Object is a string : 23
+
+========================
+Expression: substring("12345",0,3)
+Object is a string : 12
+
+========================
+Expression: substring("12345",-8,10)
+Object is a string : 1
+
+========================
+Expression: substring("12345",4,-10)
+Object is a string :
+
+========================
+Expression: substring("12345",0 div 0, 3)
+Object is a string :
+
+========================
+Expression: substring("12345",1, 0 div 0)
+Object is a string :
+
+========================
+Expression: substring("12345",1 div 0, 3)
+Object is a string :
+
+========================
+Expression: substring("12345",3,-1 div 0)
+Object is a string :
+
+========================
+Expression: substring("12345",-42, 1 div 0)
+Object is a string : 12345
+
+========================
+Expression: substring("12345",-1 div 0, 1 div 0)
+Object is a string :
+
+========================
+Expression: substring("12345",-1 div 0,5)
+Object is a string :
+
+========================
+Expression: string-length("")
+Object is a number : 0
+
+========================
+Expression: string-length("titi")
+Object is a number : 4