leptris 1.9.231.1-arm-linux → 1.9.232.0-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Rakefile +1 -1
- data/ext/leptris/native/native.c +35 -4
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/ffi.rb +4 -0
- data/lib/leptris/xml/native.so +0 -0
- data/lib/leptris/xml/node.rb +28 -0
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +15 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/include/leptris/descriptor.h +5 -1
- data/vendor-src/libleptris/src/include/leptris.h +17 -0
- data/vendor-src/libleptris/src/leptris/descriptor/plan.c +26 -6
- data/vendor-src/libleptris/src/leptris/dom/node.c +24 -7
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_operators.c +22 -8
- data/vendor-src/libleptris/src/leptris/xpath/functions.c +29 -8
- data/vendor-src/libleptris/src/leptris/xpath/functions_ext31.c +30 -1
- data/vendor-src/libleptris/src/leptris/xpath/parser.c +106 -6
- data/vendor-src/libleptris/test/abi/test_descriptor.cpp +68 -0
- data/vendor-src/libleptris/test/dom/test_dom.cpp +56 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/codepoints-to-string.xml +808 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/deep-equal.xml +2709 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/distinct-values.xml +1223 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/index-of.xml +493 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/insert-before.xml +399 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/remove.xml +480 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/reverse.xml +653 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/string-to-codepoints.xml +452 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/subsequence.xml +1041 -0
- data/vendor-src/libleptris/test/xquery/test_qt3.cpp +179 -1
- data/vendor-src/libleptris/test/xquery/test_xquery.cpp +27 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +11 -2
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="us-ascii"?>
|
|
2
|
+
<test-set xmlns="http://www.w3.org/2010/09/qt-fots-catalog" name="fn-index-of">
|
|
3
|
+
<description>Tests for the index-of function</description>
|
|
4
|
+
<link type="spec" document="http://www.w3.org/TR/xpath-functions-30/"
|
|
5
|
+
idref="func-index-of"/>
|
|
6
|
+
<link type="spec" document="FuncOps" section-number="15.1.3" idref="func-index-of"/>
|
|
7
|
+
|
|
8
|
+
<environment name="bib">
|
|
9
|
+
<source role="." file="../docs/bib.xml">
|
|
10
|
+
<description>Data for the the XML Query XMP use cases</description>
|
|
11
|
+
<created by="XQuery WG" on="2005-02-11"/>
|
|
12
|
+
</source>
|
|
13
|
+
</environment>
|
|
14
|
+
|
|
15
|
+
<test-case name="fn-indexof-mix-args-001">
|
|
16
|
+
<description> arg1: Sequence of integers , arg2: integer </description>
|
|
17
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
18
|
+
<test>fn:index-of ((10, 20, 30, 30, 20, 10), 20)</test>
|
|
19
|
+
<result>
|
|
20
|
+
<assert-string-value>2 5</assert-string-value>
|
|
21
|
+
</result>
|
|
22
|
+
</test-case>
|
|
23
|
+
|
|
24
|
+
<test-case name="fn-indexof-mix-args-002">
|
|
25
|
+
<description> arg1: Sequence of integers , arg2: integer </description>
|
|
26
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
27
|
+
<test>fn:index-of ((10, 20, 30, 40), 35)</test>
|
|
28
|
+
<result>
|
|
29
|
+
<assert-string-value/>
|
|
30
|
+
</result>
|
|
31
|
+
</test-case>
|
|
32
|
+
|
|
33
|
+
<test-case name="fn-indexof-mix-args-003">
|
|
34
|
+
<description> arg1: Sequence of string , arg2: string </description>
|
|
35
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
36
|
+
<test>fn:index-of (("a", "sport", "and", "a", "pastime"), "a")</test>
|
|
37
|
+
<result>
|
|
38
|
+
<assert-string-value>1 4</assert-string-value>
|
|
39
|
+
</result>
|
|
40
|
+
</test-case>
|
|
41
|
+
|
|
42
|
+
<test-case name="fn-indexof-mix-args-004">
|
|
43
|
+
<description> arg1: Sequence of string , arg2: string </description>
|
|
44
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
45
|
+
<test>fn:index-of(("sport", "", "and", "", "", "pastime"), "")</test>
|
|
46
|
+
<result>
|
|
47
|
+
<assert-string-value>2 4 5</assert-string-value>
|
|
48
|
+
</result>
|
|
49
|
+
</test-case>
|
|
50
|
+
|
|
51
|
+
<test-case name="fn-indexof-mix-args-005">
|
|
52
|
+
<description> arg1: empty Sequence , arg2: string </description>
|
|
53
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
54
|
+
<test>fn:index-of((),"")</test>
|
|
55
|
+
<result>
|
|
56
|
+
<assert-string-value/>
|
|
57
|
+
</result>
|
|
58
|
+
</test-case>
|
|
59
|
+
|
|
60
|
+
<test-case name="fn-indexof-mix-args-006">
|
|
61
|
+
<description> arg1: Sequence of string , arg2: string </description>
|
|
62
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
63
|
+
<test>fn:index-of(("sport"), "")</test>
|
|
64
|
+
<result>
|
|
65
|
+
<assert-string-value/>
|
|
66
|
+
</result>
|
|
67
|
+
</test-case>
|
|
68
|
+
|
|
69
|
+
<test-case name="fn-indexof-mix-args-007">
|
|
70
|
+
<description> arg1: empty Sequence , arg2: untypedAtomic </description>
|
|
71
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
72
|
+
<test>fn:index-of((),fn:exactly-one(xs:untypedAtomic('')))</test>
|
|
73
|
+
<result>
|
|
74
|
+
<assert-string-value/>
|
|
75
|
+
</result>
|
|
76
|
+
</test-case>
|
|
77
|
+
|
|
78
|
+
<test-case name="fn-indexof-mix-args-008">
|
|
79
|
+
<description> arg1: Sequence of float , arg2: float </description>
|
|
80
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
81
|
+
<test>fn:index-of((xs:float('NaN')), fn:exactly-one(xs:float('NaN')))</test>
|
|
82
|
+
<result>
|
|
83
|
+
<assert-string-value/>
|
|
84
|
+
</result>
|
|
85
|
+
</test-case>
|
|
86
|
+
|
|
87
|
+
<test-case name="fn-indexof-mix-args-009">
|
|
88
|
+
<description> arg1: Sequence of double , arg2: double </description>
|
|
89
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
90
|
+
<test>fn:index-of((xs:double('NaN')), fn:exactly-one(xs:double('NaN')))</test>
|
|
91
|
+
<result>
|
|
92
|
+
<assert-string-value/>
|
|
93
|
+
</result>
|
|
94
|
+
</test-case>
|
|
95
|
+
|
|
96
|
+
<test-case name="fn-indexof-mix-args-010">
|
|
97
|
+
<description> arg1: Sequence of double, arg2: double </description>
|
|
98
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
99
|
+
<test>fn:index-of((xs:double('INF')), fn:exactly-one(xs:double('INF')))</test>
|
|
100
|
+
<result>
|
|
101
|
+
<assert-eq>1</assert-eq>
|
|
102
|
+
</result>
|
|
103
|
+
</test-case>
|
|
104
|
+
|
|
105
|
+
<test-case name="fn-indexof-mix-args-011">
|
|
106
|
+
<description> arg1: Sequence of double, arg2: double </description>
|
|
107
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
108
|
+
<test>fn:index-of((xs:double('-INF')), fn:exactly-one(xs:double('-INF')))</test>
|
|
109
|
+
<result>
|
|
110
|
+
<assert-eq>1</assert-eq>
|
|
111
|
+
</result>
|
|
112
|
+
</test-case>
|
|
113
|
+
|
|
114
|
+
<test-case name="fn-indexof-mix-args-012">
|
|
115
|
+
<description> arg1: Sequence of decimal, arg2: decimal </description>
|
|
116
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
117
|
+
<test>fn:index-of((xs:decimal('9.99999999999999999999999999')), fn:exactly-one(xs:decimal('9.99999999999999999999999999')))</test>
|
|
118
|
+
<result>
|
|
119
|
+
<assert-eq>1</assert-eq>
|
|
120
|
+
</result>
|
|
121
|
+
</test-case>
|
|
122
|
+
|
|
123
|
+
<test-case name="fn-indexof-mix-args-013">
|
|
124
|
+
<description> arg1: Sequence of decimal, arg2: decimal </description>
|
|
125
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
126
|
+
<test>fn:index-of((xs:decimal('9.99999999999999999999999999')), fn:exactly-one(xs:decimal('9.9999999999999999999999999')))</test>
|
|
127
|
+
<result>
|
|
128
|
+
<assert-string-value/>
|
|
129
|
+
</result>
|
|
130
|
+
</test-case>
|
|
131
|
+
|
|
132
|
+
<test-case name="fn-indexof-mix-args-014">
|
|
133
|
+
<description> arg1: Sequence of positiveInteger, arg2: positiveInteger </description>
|
|
134
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
135
|
+
<test>fn:index-of((xs:positiveInteger('1'),xs:positiveInteger('2')), fn:exactly-one(xs:positiveInteger('2')))</test>
|
|
136
|
+
<result>
|
|
137
|
+
<assert-eq>2</assert-eq>
|
|
138
|
+
</result>
|
|
139
|
+
</test-case>
|
|
140
|
+
|
|
141
|
+
<test-case name="fn-indexof-mix-args-015">
|
|
142
|
+
<description> arg1: Sequence of negativeInteger, arg2: negativeInteger </description>
|
|
143
|
+
<created by="Pulkita Tyagi" on="2005-05-25"/>
|
|
144
|
+
<test>fn:index-of((xs:negativeInteger('-2'), xs:negativeInteger('-1')), fn:exactly-one(xs:negativeInteger('-1')))</test>
|
|
145
|
+
<result>
|
|
146
|
+
<assert-eq>2</assert-eq>
|
|
147
|
+
</result>
|
|
148
|
+
</test-case>
|
|
149
|
+
|
|
150
|
+
<test-case name="fn-indexof-mix-args-016">
|
|
151
|
+
<description> Use a nested sequence in the sequence to search </description>
|
|
152
|
+
<created by="Ravindranath Chennoju" on="2005-05-25"/>
|
|
153
|
+
<test>fn:index-of((1, (1,2,3)),1)</test>
|
|
154
|
+
<result>
|
|
155
|
+
<assert-string-value>1 2</assert-string-value>
|
|
156
|
+
</result>
|
|
157
|
+
</test-case>
|
|
158
|
+
|
|
159
|
+
<test-case name="fn-indexof-mix-args-017">
|
|
160
|
+
<description> Use multiple nested sequence in the sequence to search </description>
|
|
161
|
+
<created by="Ravindranath Chennoju" on="2005-05-25"/>
|
|
162
|
+
<test>fn:index-of(((1),(1), (2,1), (0,1)),1)</test>
|
|
163
|
+
<result>
|
|
164
|
+
<assert-string-value>1 2 4 6</assert-string-value>
|
|
165
|
+
</result>
|
|
166
|
+
</test-case>
|
|
167
|
+
|
|
168
|
+
<test-case name="fn-indexof-mix-args-018">
|
|
169
|
+
<description> Use external variable for the sequence parameter </description>
|
|
170
|
+
<created by="Ravindranath Chennoju" on="2005-05-25"/>
|
|
171
|
+
<environment ref="bib"/>
|
|
172
|
+
<test>fn:index-of((/bib/book/publisher), "Addison-Wesley")</test>
|
|
173
|
+
<result>
|
|
174
|
+
<assert-string-value>1 2</assert-string-value>
|
|
175
|
+
</result>
|
|
176
|
+
</test-case>
|
|
177
|
+
|
|
178
|
+
<test-case name="fn-indexof-mix-args-019">
|
|
179
|
+
<description> Use external variable both in sequence and search parameter </description>
|
|
180
|
+
<created by="Ravindranath Chennoju" on="2005-05-25"/>
|
|
181
|
+
<environment ref="bib"/>
|
|
182
|
+
<test>fn:index-of((/bib/book/publisher), /bib/book[1]/publisher[1]/text() cast as xs:string)</test>
|
|
183
|
+
<result>
|
|
184
|
+
<assert-string-value>1 2</assert-string-value>
|
|
185
|
+
</result>
|
|
186
|
+
</test-case>
|
|
187
|
+
|
|
188
|
+
<test-case name="fn-indexof-mix-args-020">
|
|
189
|
+
<description> Use empty string with other strings in sequence </description>
|
|
190
|
+
<created by="Ravindranath Chennoju" on="2005-05-25"/>
|
|
191
|
+
<test>fn:index-of(("sport", "", "and", "", "", "pastime"), "")</test>
|
|
192
|
+
<result>
|
|
193
|
+
<assert-string-value>2 4 5</assert-string-value>
|
|
194
|
+
</result>
|
|
195
|
+
</test-case>
|
|
196
|
+
|
|
197
|
+
<test-case name="fn-indexof-mix-args-021">
|
|
198
|
+
<description> Use empty string with integers in the sequence parameter </description>
|
|
199
|
+
<created by="Ravindranath Chennoju" on="2005-05-25"/>
|
|
200
|
+
<test>fn:index-of( ("", 1, ""), "")</test>
|
|
201
|
+
<result>
|
|
202
|
+
<assert-string-value>1 3</assert-string-value>
|
|
203
|
+
</result>
|
|
204
|
+
</test-case>
|
|
205
|
+
|
|
206
|
+
<test-case name="fn-indexof-mix-args-022">
|
|
207
|
+
<description> Use no search parameter </description>
|
|
208
|
+
<created by="Ravindranath Chennoju" on="2005-05-25"/>
|
|
209
|
+
<test>fn:index-of((1,2,3,4))</test>
|
|
210
|
+
<result>
|
|
211
|
+
<error code="XPST0017"/>
|
|
212
|
+
</result>
|
|
213
|
+
</test-case>
|
|
214
|
+
|
|
215
|
+
<test-case name="K-SeqIndexOfFunc-1">
|
|
216
|
+
<description> A test whose essence is: `index-of()`. </description>
|
|
217
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
218
|
+
<test>index-of()</test>
|
|
219
|
+
<result>
|
|
220
|
+
<error code="XPST0017"/>
|
|
221
|
+
</result>
|
|
222
|
+
</test-case>
|
|
223
|
+
|
|
224
|
+
<test-case name="K-SeqIndexOfFunc-2">
|
|
225
|
+
<description> A test whose essence is: `index-of(1)`. </description>
|
|
226
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
227
|
+
<test>index-of(1)</test>
|
|
228
|
+
<result>
|
|
229
|
+
<error code="XPST0017"/>
|
|
230
|
+
</result>
|
|
231
|
+
</test-case>
|
|
232
|
+
|
|
233
|
+
<test-case name="K-SeqIndexOfFunc-3">
|
|
234
|
+
<description> A test whose essence is: `index-of((1, 2, 3), 1, ())`. </description>
|
|
235
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
236
|
+
<test>index-of((1, 2, 3), 1, ())</test>
|
|
237
|
+
<result>
|
|
238
|
+
<error code="XPTY0004"/>
|
|
239
|
+
</result>
|
|
240
|
+
</test-case>
|
|
241
|
+
|
|
242
|
+
<test-case name="K-SeqIndexOfFunc-4">
|
|
243
|
+
<description> A test whose essence is: `index-of("a string", "a string", "http://www.example.com/COLLATION/NOT/SUPPORTED")`. </description>
|
|
244
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
245
|
+
<test>index-of("a string", "a string", "http://www.example.com/COLLATION/NOT/SUPPORTED")</test>
|
|
246
|
+
<result>
|
|
247
|
+
<error code="FOCH0002"/>
|
|
248
|
+
</result>
|
|
249
|
+
</test-case>
|
|
250
|
+
|
|
251
|
+
<test-case name="K-SeqIndexOfFunc-5">
|
|
252
|
+
<description> A test whose essence is: `index-of("a string", "a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint", "wrong param")`. </description>
|
|
253
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
254
|
+
<test>index-of("a string", "a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint", "wrong param")</test>
|
|
255
|
+
<result>
|
|
256
|
+
<error code="XPST0017"/>
|
|
257
|
+
</result>
|
|
258
|
+
</test-case>
|
|
259
|
+
|
|
260
|
+
<test-case name="K-SeqIndexOfFunc-6">
|
|
261
|
+
<description> A test whose essence is: `index-of("a string", "a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint")`. </description>
|
|
262
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
263
|
+
<test>index-of("a string", "a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint")</test>
|
|
264
|
+
<result>
|
|
265
|
+
<assert-eq>1</assert-eq>
|
|
266
|
+
</result>
|
|
267
|
+
</test-case>
|
|
268
|
+
|
|
269
|
+
<test-case name="K-SeqIndexOfFunc-7">
|
|
270
|
+
<description> A test whose essence is: `empty(index-of(xs:double("NaN"), xs:float("NaN")))`. </description>
|
|
271
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
272
|
+
<test>empty(index-of(xs:double("NaN"), xs:float("NaN")))</test>
|
|
273
|
+
<result>
|
|
274
|
+
<assert-true/>
|
|
275
|
+
</result>
|
|
276
|
+
</test-case>
|
|
277
|
+
|
|
278
|
+
<test-case name="K-SeqIndexOfFunc-8">
|
|
279
|
+
<description> A test whose essence is: `empty(index-of(xs:float("NaN"), xs:double("NaN")))`. </description>
|
|
280
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
281
|
+
<test>empty(index-of(xs:float("NaN"), xs:double("NaN")))</test>
|
|
282
|
+
<result>
|
|
283
|
+
<assert-true/>
|
|
284
|
+
</result>
|
|
285
|
+
</test-case>
|
|
286
|
+
|
|
287
|
+
<test-case name="K-SeqIndexOfFunc-9">
|
|
288
|
+
<description> A test whose essence is: `empty(index-of(xs:float("NaN"), xs:float("NaN")))`. </description>
|
|
289
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
290
|
+
<test>empty(index-of(xs:float("NaN"), xs:float("NaN")))</test>
|
|
291
|
+
<result>
|
|
292
|
+
<assert-true/>
|
|
293
|
+
</result>
|
|
294
|
+
</test-case>
|
|
295
|
+
|
|
296
|
+
<test-case name="K-SeqIndexOfFunc-10">
|
|
297
|
+
<description> A test whose essence is: `empty(index-of(xs:double("NaN"), xs:double("NaN")))`. </description>
|
|
298
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
299
|
+
<test>empty(index-of(xs:double("NaN"), xs:double("NaN")))</test>
|
|
300
|
+
<result>
|
|
301
|
+
<assert-true/>
|
|
302
|
+
</result>
|
|
303
|
+
</test-case>
|
|
304
|
+
|
|
305
|
+
<test-case name="K-SeqIndexOfFunc-11">
|
|
306
|
+
<description> A test whose essence is: `empty(index-of(4, "4"))`. </description>
|
|
307
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
308
|
+
<test>empty(index-of(4, "4"))</test>
|
|
309
|
+
<result>
|
|
310
|
+
<assert-true/>
|
|
311
|
+
</result>
|
|
312
|
+
</test-case>
|
|
313
|
+
|
|
314
|
+
<test-case name="K-SeqIndexOfFunc-12">
|
|
315
|
+
<description> A test whose essence is: `index-of(4, 4)`. </description>
|
|
316
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
317
|
+
<test>index-of(4, 4)</test>
|
|
318
|
+
<result>
|
|
319
|
+
<assert-eq>1</assert-eq>
|
|
320
|
+
</result>
|
|
321
|
+
</test-case>
|
|
322
|
+
|
|
323
|
+
<test-case name="K-SeqIndexOfFunc-13">
|
|
324
|
+
<description> A test whose essence is: `empty(index-of((), 4))`. </description>
|
|
325
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
326
|
+
<test>empty(index-of((), 4))</test>
|
|
327
|
+
<result>
|
|
328
|
+
<assert-true/>
|
|
329
|
+
</result>
|
|
330
|
+
</test-case>
|
|
331
|
+
|
|
332
|
+
<test-case name="K-SeqIndexOfFunc-14">
|
|
333
|
+
<description> A test whose essence is: `index-of(4, 4)`. </description>
|
|
334
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
335
|
+
<test>index-of(4, 4)</test>
|
|
336
|
+
<result>
|
|
337
|
+
<assert-eq>1</assert-eq>
|
|
338
|
+
</result>
|
|
339
|
+
</test-case>
|
|
340
|
+
|
|
341
|
+
<test-case name="K-SeqIndexOfFunc-15">
|
|
342
|
+
<description> A test whose essence is: `deep-equal((1, 2, 3, 4, 5, 6), index-of((4, 4, 4, 4, 4, 4), 4))`. </description>
|
|
343
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
344
|
+
<test>deep-equal((1, 2, 3, 4, 5, 6), index-of((4, 4, 4, 4, 4, 4), 4))</test>
|
|
345
|
+
<result>
|
|
346
|
+
<assert-true/>
|
|
347
|
+
</result>
|
|
348
|
+
</test-case>
|
|
349
|
+
|
|
350
|
+
<test-case name="K-SeqIndexOfFunc-16">
|
|
351
|
+
<description> A test whose essence is: `empty(index-of(xs:anyURI("example.com/"), xs:hexBinary("FF")))`. </description>
|
|
352
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
353
|
+
<test>empty(index-of(xs:anyURI("example.com/"), xs:hexBinary("FF")))</test>
|
|
354
|
+
<result>
|
|
355
|
+
<assert-true/>
|
|
356
|
+
</result>
|
|
357
|
+
</test-case>
|
|
358
|
+
|
|
359
|
+
<test-case name="K-SeqIndexOfFunc-17">
|
|
360
|
+
<description> A test whose essence is: `index-of(xs:untypedAtomic("example.com/"), xs:anyURI("example.com/"))`. </description>
|
|
361
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
362
|
+
<test>index-of(xs:untypedAtomic("example.com/"), xs:anyURI("example.com/"))</test>
|
|
363
|
+
<result>
|
|
364
|
+
<assert-eq>1</assert-eq>
|
|
365
|
+
</result>
|
|
366
|
+
</test-case>
|
|
367
|
+
|
|
368
|
+
<test-case name="K-SeqIndexOfFunc-18">
|
|
369
|
+
<description> A test whose essence is: `deep-equal(index-of((1, 2, "three", 5, 5, 6), 5), (4, 5))`. </description>
|
|
370
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
371
|
+
<test>deep-equal(index-of((1, 2, "three", 5, 5, 6), 5), (4, 5))</test>
|
|
372
|
+
<result>
|
|
373
|
+
<assert-true/>
|
|
374
|
+
</result>
|
|
375
|
+
</test-case>
|
|
376
|
+
|
|
377
|
+
<test-case name="K-SeqIndexOfFunc-19">
|
|
378
|
+
<description> A test whose essence is: `empty(index-of((10, 20, 30, 40), 35))`. </description>
|
|
379
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
380
|
+
<test>empty(index-of((10, 20, 30, 40), 35))</test>
|
|
381
|
+
<result>
|
|
382
|
+
<assert-true/>
|
|
383
|
+
</result>
|
|
384
|
+
</test-case>
|
|
385
|
+
|
|
386
|
+
<test-case name="K-SeqIndexOfFunc-20">
|
|
387
|
+
<description> A test whose essence is: `deep-equal(index-of((10, 20, 30, 30, 20, 10), 20), (2, 5))`. </description>
|
|
388
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
389
|
+
<test>deep-equal(index-of((10, 20, 30, 30, 20, 10), 20), (2, 5))</test>
|
|
390
|
+
<result>
|
|
391
|
+
<assert-true/>
|
|
392
|
+
</result>
|
|
393
|
+
</test-case>
|
|
394
|
+
|
|
395
|
+
<test-case name="K-SeqIndexOfFunc-21">
|
|
396
|
+
<description> A test whose essence is: `deep-equal(index-of(("a", "sport", "and", "a", "pastime"), "a"), (1, 4))`. </description>
|
|
397
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
398
|
+
<test>deep-equal(index-of(("a", "sport", "and", "a", "pastime"), "a"), (1, 4))</test>
|
|
399
|
+
<result>
|
|
400
|
+
<assert-true/>
|
|
401
|
+
</result>
|
|
402
|
+
</test-case>
|
|
403
|
+
|
|
404
|
+
<test-case name="K-SeqIndexOfFunc-22">
|
|
405
|
+
<description> A test whose essence is: `count(index-of((1, 2, 3, 2, 1), 2)) eq 2`. </description>
|
|
406
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
407
|
+
<test>count(index-of((1, 2, 3, 2, 1), 2)) eq 2</test>
|
|
408
|
+
<result>
|
|
409
|
+
<assert-true/>
|
|
410
|
+
</result>
|
|
411
|
+
</test-case>
|
|
412
|
+
|
|
413
|
+
<test-case name="K-SeqIndexOfFunc-23">
|
|
414
|
+
<description> A test whose essence is: `count(index-of((1, 2, 3, 2, 1), 1)) eq 2`. </description>
|
|
415
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
416
|
+
<test>count(index-of((1, 2, 3, 2, 1), 1)) eq 2</test>
|
|
417
|
+
<result>
|
|
418
|
+
<assert-true/>
|
|
419
|
+
</result>
|
|
420
|
+
</test-case>
|
|
421
|
+
|
|
422
|
+
<test-case name="K-SeqIndexOfFunc-24">
|
|
423
|
+
<description> A test whose essence is: `count(index-of((1, 2, 3, 2, 1), 3)) eq 1`. </description>
|
|
424
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
425
|
+
<test>count(index-of((1, 2, 3, 2, 1), 3)) eq 1</test>
|
|
426
|
+
<result>
|
|
427
|
+
<assert-true/>
|
|
428
|
+
</result>
|
|
429
|
+
</test-case>
|
|
430
|
+
|
|
431
|
+
<test-case name="K-SeqIndexOfFunc-25">
|
|
432
|
+
<description> A test whose essence is: `count(index-of((1, 2, 3, 2, 1), 4)) eq 0`. </description>
|
|
433
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
434
|
+
<test>count(index-of((1, 2, 3, 2, 1), 4)) eq 0</test>
|
|
435
|
+
<result>
|
|
436
|
+
<assert-true/>
|
|
437
|
+
</result>
|
|
438
|
+
</test-case>
|
|
439
|
+
|
|
440
|
+
<test-case name="cbcl-fn-indexof-1">
|
|
441
|
+
<description> Test an index-of on a range expression </description>
|
|
442
|
+
<created by="Nick Jones" on="2008-05-30"/>
|
|
443
|
+
<test>index-of(1 to 5,4)</test>
|
|
444
|
+
<result>
|
|
445
|
+
<assert-string-value>4</assert-string-value>
|
|
446
|
+
</result>
|
|
447
|
+
</test-case>
|
|
448
|
+
|
|
449
|
+
<test-case name="cbcl-fn-indexof-2">
|
|
450
|
+
<description> Test optimization of index-of to equal </description>
|
|
451
|
+
<created by="Nick Jones" on="2008-06-06"/>
|
|
452
|
+
<test>index-of(exactly-one((1 to 10)[. div 5 = 1]),5)</test>
|
|
453
|
+
<result>
|
|
454
|
+
<assert-string-value>1</assert-string-value>
|
|
455
|
+
</result>
|
|
456
|
+
</test-case>
|
|
457
|
+
|
|
458
|
+
<test-case name="cbcl-fn-indexof-3">
|
|
459
|
+
<description> Test boolean of indexof </description>
|
|
460
|
+
<created by="Nick Jones" on="2008-06-12"/>
|
|
461
|
+
<test>boolean(index-of((1 to 10)[. mod 2 = 0],4))</test>
|
|
462
|
+
<result>
|
|
463
|
+
<assert-true/>
|
|
464
|
+
</result>
|
|
465
|
+
</test-case>
|
|
466
|
+
|
|
467
|
+
<test-case name="cbcl-fn-indexof-4">
|
|
468
|
+
<description> Tests false boolean of indexof </description>
|
|
469
|
+
<created by="Nick Jones" on="2008-06-12"/>
|
|
470
|
+
<test>boolean(index-of((1 to 10)[. mod 2 = 0],5))</test>
|
|
471
|
+
<result>
|
|
472
|
+
<assert-false/>
|
|
473
|
+
</result>
|
|
474
|
+
</test-case>
|
|
475
|
+
|
|
476
|
+
<test-case name="cbcl-fn-indexof-5">
|
|
477
|
+
<description> Tests fn:index-of of a range value followed by an sequence </description>
|
|
478
|
+
<created by="Nick Jones" on="2008-06-16"/>
|
|
479
|
+
<test>index-of((1 to 10,(1 to 10)[. mod 2 = 0]),4)</test>
|
|
480
|
+
<result>
|
|
481
|
+
<assert-string-value>4 12</assert-string-value>
|
|
482
|
+
</result>
|
|
483
|
+
</test-case>
|
|
484
|
+
|
|
485
|
+
<test-case name="cbcl-fn-indexof-006">
|
|
486
|
+
<description> Tests corner case </description>
|
|
487
|
+
<created by="Nick Jones" on="2008-06-27"/>
|
|
488
|
+
<test>index-of(1 to 10,(1 to 10)[. div 2 = 0][1])</test>
|
|
489
|
+
<result>
|
|
490
|
+
<error code="XPTY0004"/>
|
|
491
|
+
</result>
|
|
492
|
+
</test-case>
|
|
493
|
+
</test-set>
|