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,480 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="us-ascii"?>
|
|
2
|
+
<test-set xmlns="http://www.w3.org/2010/09/qt-fots-catalog" name="fn-remove">
|
|
3
|
+
<description>Tests for the remove() function</description>
|
|
4
|
+
<link type="spec" document="http://www.w3.org/TR/xpath-functions-30/"
|
|
5
|
+
idref="func-remove"/>
|
|
6
|
+
|
|
7
|
+
<test-case name="fn-remove-mix-args-001">
|
|
8
|
+
<description> arg1: sequence of string, arg2: integer </description>
|
|
9
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
10
|
+
<test>fn:remove ( ("a", "b", "c"), 1)</test>
|
|
11
|
+
<result>
|
|
12
|
+
<assert-deep-eq>"b", "c"</assert-deep-eq>
|
|
13
|
+
</result>
|
|
14
|
+
</test-case>
|
|
15
|
+
|
|
16
|
+
<test-case name="fn-remove-mix-args-002">
|
|
17
|
+
<description> arg1: sequence of string, arg2: integer </description>
|
|
18
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
19
|
+
<test>fn:remove ( ("a", "b", "c"), 0)</test>
|
|
20
|
+
<result>
|
|
21
|
+
<assert-deep-eq>"a", "b", "c"</assert-deep-eq>
|
|
22
|
+
</result>
|
|
23
|
+
</test-case>
|
|
24
|
+
|
|
25
|
+
<test-case name="fn-remove-mix-args-003">
|
|
26
|
+
<description> arg1: sequence of string, arg2: integer </description>
|
|
27
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
28
|
+
<test>fn:remove ( ("a", "b", "c", true()), 3)</test>
|
|
29
|
+
<result>
|
|
30
|
+
<assert-deep-eq>"a", "b", true()</assert-deep-eq>
|
|
31
|
+
</result>
|
|
32
|
+
</test-case>
|
|
33
|
+
|
|
34
|
+
<test-case name="fn-remove-mix-args-004">
|
|
35
|
+
<description> arg1: sequence of string, arg2: integer </description>
|
|
36
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
37
|
+
<test>fn:remove ( (xs:string("xyz"), (), (), "a" , "b"), 2)</test>
|
|
38
|
+
<result>
|
|
39
|
+
<assert-deep-eq>"xyz", "b"</assert-deep-eq>
|
|
40
|
+
</result>
|
|
41
|
+
</test-case>
|
|
42
|
+
|
|
43
|
+
<test-case name="fn-remove-mix-args-005">
|
|
44
|
+
<description> arg1: sequence of string,anyURI,arg2: integer </description>
|
|
45
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
46
|
+
<test>fn:remove( (xs:anyURI("www.example.com"), "a", (""), "b"), 2)</test>
|
|
47
|
+
<result>
|
|
48
|
+
<assert-deep-eq>"www.example.com", "", "b"</assert-deep-eq>
|
|
49
|
+
</result>
|
|
50
|
+
</test-case>
|
|
51
|
+
|
|
52
|
+
<test-case name="fn-remove-mix-args-006">
|
|
53
|
+
<description> arg1: sequence of string,anyURI,arg2: integer </description>
|
|
54
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
55
|
+
<test>fn:remove( (xs:anyURI("www.example.com"), "a", (""), "b"), 10)</test>
|
|
56
|
+
<result>
|
|
57
|
+
<assert-deep-eq>"www.example.com", "a", "", "b"</assert-deep-eq>
|
|
58
|
+
</result>
|
|
59
|
+
</test-case>
|
|
60
|
+
|
|
61
|
+
<test-case name="fn-remove-mix-args-007">
|
|
62
|
+
<description> arg1: sequence of string,anyURI,arg2: integer </description>
|
|
63
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
64
|
+
<test>fn:remove( (xs:anyURI("www.example.com"), "a", (""), "b"), -20)</test>
|
|
65
|
+
<result>
|
|
66
|
+
<assert-deep-eq>"www.example.com", "a", "", "b"</assert-deep-eq>
|
|
67
|
+
</result>
|
|
68
|
+
</test-case>
|
|
69
|
+
|
|
70
|
+
<test-case name="fn-remove-mix-args-008">
|
|
71
|
+
<description> arg1:sequence of string,integer,arg2: integer </description>
|
|
72
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
73
|
+
<test>fn:remove( (xs:integer("100"), xs:string("abc")), 1)</test>
|
|
74
|
+
<result>
|
|
75
|
+
<assert-eq>"abc"</assert-eq>
|
|
76
|
+
</result>
|
|
77
|
+
</test-case>
|
|
78
|
+
|
|
79
|
+
<test-case name="fn-remove-mix-args-009">
|
|
80
|
+
<description> arg1: sequence of decimal, integer, anyURI arg2: integer </description>
|
|
81
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
82
|
+
<test>fn:remove( (xs:decimal("1.01"), xs:integer("12"), xs:anyURI("www.example.com")),3)</test>
|
|
83
|
+
<result>
|
|
84
|
+
<assert-deep-eq>1.01, 12</assert-deep-eq>
|
|
85
|
+
</result>
|
|
86
|
+
</test-case>
|
|
87
|
+
|
|
88
|
+
<test-case name="fn-remove-mix-args-010">
|
|
89
|
+
<description> arg1: sequence of string,float ,arg2: integer </description>
|
|
90
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
91
|
+
<modified by="Michael Kay" on="2025-10-02" change="more precise expected result"/>
|
|
92
|
+
<test>fn:remove( (xs:float("1.01"), xs:string("a")), 2)</test>
|
|
93
|
+
<result>
|
|
94
|
+
<assert-eq>xs:float(1.01)</assert-eq>
|
|
95
|
+
</result>
|
|
96
|
+
</test-case>
|
|
97
|
+
|
|
98
|
+
<test-case name="fn-remove-mix-args-011">
|
|
99
|
+
<description> arg1: sequence of float,integer,arg2: integer </description>
|
|
100
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
101
|
+
<test>fn:remove( (xs:float("NaN"), 100, (), 2), 2)</test>
|
|
102
|
+
<result>
|
|
103
|
+
<assert-deep-eq>xs:float('NaN'), 2</assert-deep-eq>
|
|
104
|
+
</result>
|
|
105
|
+
</test-case>
|
|
106
|
+
|
|
107
|
+
<test-case name="fn-remove-mix-args-012">
|
|
108
|
+
<description> arg1: sequence of string,float, decimal arg2: integer </description>
|
|
109
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
110
|
+
<test>fn:remove( (xs:float("-INF"), xs:decimal("2.34"), "abc"), 2)</test>
|
|
111
|
+
<result>
|
|
112
|
+
<assert-deep-eq>xs:float("-INF"), "abc"</assert-deep-eq>
|
|
113
|
+
</result>
|
|
114
|
+
</test-case>
|
|
115
|
+
|
|
116
|
+
<test-case name="fn-remove-mix-args-013">
|
|
117
|
+
<description> arg1: sequence of double,float,boolean ,arg2: integer </description>
|
|
118
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
119
|
+
<test>fn:remove( (xs:double("1.34"), xs:float("INF"), true()), 1)</test>
|
|
120
|
+
<result>
|
|
121
|
+
<assert-deep-eq>xs:float("INF"), true()</assert-deep-eq>
|
|
122
|
+
</result>
|
|
123
|
+
</test-case>
|
|
124
|
+
|
|
125
|
+
<test-case name="fn-remove-mix-args-014">
|
|
126
|
+
<description> arg1: sequence of double, integer ,arg2: integer </description>
|
|
127
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
128
|
+
<test>fn:remove( (xs:double("INF"), 2, 3), 2)</test>
|
|
129
|
+
<result>
|
|
130
|
+
<assert-deep-eq>xs:double("INF"), 3</assert-deep-eq>
|
|
131
|
+
</result>
|
|
132
|
+
</test-case>
|
|
133
|
+
|
|
134
|
+
<test-case name="fn-remove-mix-args-015">
|
|
135
|
+
<description> arg1: sequence of string,double ,arg2: integer </description>
|
|
136
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
137
|
+
<test>fn:remove( (xs:double("NaN"), "a", "b"), 3)</test>
|
|
138
|
+
<result>
|
|
139
|
+
<assert-deep-eq>xs:double("NaN"), "a"</assert-deep-eq>
|
|
140
|
+
</result>
|
|
141
|
+
</test-case>
|
|
142
|
+
|
|
143
|
+
<test-case name="fn-remove-mix-args-016">
|
|
144
|
+
<description> arg1: sequence of string,boolean, double ,arg2: integer </description>
|
|
145
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
146
|
+
<test>fn:remove( (xs:boolean("1"), xs:double("-INF"), "s"), 3)</test>
|
|
147
|
+
<result>
|
|
148
|
+
<assert-deep-eq>true(), xs:double("-INF")</assert-deep-eq>
|
|
149
|
+
</result>
|
|
150
|
+
</test-case>
|
|
151
|
+
|
|
152
|
+
<test-case name="fn-remove-mix-args-017">
|
|
153
|
+
<description> arg1: sequence of boolean ,arg2: integer </description>
|
|
154
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
155
|
+
<test>fn:remove( (xs:boolean("0")), 2 )</test>
|
|
156
|
+
<result>
|
|
157
|
+
<assert-false/>
|
|
158
|
+
</result>
|
|
159
|
+
</test-case>
|
|
160
|
+
|
|
161
|
+
<test-case name="fn-remove-mix-args-018">
|
|
162
|
+
<description> arg1: sequence of string,boolean, date ,arg2: integer </description>
|
|
163
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
164
|
+
<test>fn:remove( (xs:boolean("true"), xs:date("1993-03-31"), 4, "a"),3)</test>
|
|
165
|
+
<result>
|
|
166
|
+
<assert-deep-eq>true(), xs:date('1993-03-31'), "a"</assert-deep-eq>
|
|
167
|
+
</result>
|
|
168
|
+
</test-case>
|
|
169
|
+
|
|
170
|
+
<test-case name="fn-remove-mix-args-019">
|
|
171
|
+
<description> arg1: sequence of string,dateTime,boolean ,arg2: integer </description>
|
|
172
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
173
|
+
<test>fn:remove( (xs:dateTime("1972-12-31T00:00:00"), xs:boolean("false"), (), (" ")) ,3)</test>
|
|
174
|
+
<result>
|
|
175
|
+
<assert-deep-eq>xs:dateTime("1972-12-31T00:00:00"), false()</assert-deep-eq>
|
|
176
|
+
</result>
|
|
177
|
+
</test-case>
|
|
178
|
+
|
|
179
|
+
<test-case name="fn-remove-mix-args-020">
|
|
180
|
+
<description> arg1: sequence of time,decimal, integer ,arg2: integer </description>
|
|
181
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
182
|
+
<test>fn:remove( (xs:time("12:30:00"), xs:decimal("2.000003"), 2), 2)</test>
|
|
183
|
+
<result>
|
|
184
|
+
<assert-deep-eq>xs:time("12:30:00"), 2</assert-deep-eq>
|
|
185
|
+
</result>
|
|
186
|
+
</test-case>
|
|
187
|
+
|
|
188
|
+
<test-case name="K-SeqRemoveFunc-1">
|
|
189
|
+
<description> A test whose essence is: `remove()`. </description>
|
|
190
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
191
|
+
<test>remove()</test>
|
|
192
|
+
<result>
|
|
193
|
+
<error code="XPST0017"/>
|
|
194
|
+
</result>
|
|
195
|
+
</test-case>
|
|
196
|
+
|
|
197
|
+
<test-case name="K-SeqRemoveFunc-2">
|
|
198
|
+
<description> A test whose essence is: `remove(1, 2, "wrong param")`. </description>
|
|
199
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
200
|
+
<test>remove(1, 2, "wrong param")</test>
|
|
201
|
+
<result>
|
|
202
|
+
<error code="XPST0017"/>
|
|
203
|
+
</result>
|
|
204
|
+
</test-case>
|
|
205
|
+
|
|
206
|
+
<test-case name="K-SeqRemoveFunc-3">
|
|
207
|
+
<description> A test whose essence is: `count(remove((1, 2, 3), 0)) eq 3`. </description>
|
|
208
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
209
|
+
<test>count(remove((1, 2, 3), 0)) eq 3</test>
|
|
210
|
+
<result>
|
|
211
|
+
<assert-true/>
|
|
212
|
+
</result>
|
|
213
|
+
</test-case>
|
|
214
|
+
|
|
215
|
+
<test-case name="K-SeqRemoveFunc-4">
|
|
216
|
+
<description> A test whose essence is: `count(remove((1, 2, 3), -4)) eq 3`. </description>
|
|
217
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
218
|
+
<test>count(remove((1, 2, 3), -4)) eq 3</test>
|
|
219
|
+
<result>
|
|
220
|
+
<assert-true/>
|
|
221
|
+
</result>
|
|
222
|
+
</test-case>
|
|
223
|
+
|
|
224
|
+
<test-case name="K-SeqRemoveFunc-5">
|
|
225
|
+
<description> A test whose essence is: `empty(remove((), 4))`. </description>
|
|
226
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
227
|
+
<test>empty(remove((), 4))</test>
|
|
228
|
+
<result>
|
|
229
|
+
<any-of>
|
|
230
|
+
<assert-true/>
|
|
231
|
+
<error code="XPST0005"/>
|
|
232
|
+
</any-of>
|
|
233
|
+
</result>
|
|
234
|
+
</test-case>
|
|
235
|
+
|
|
236
|
+
<test-case name="K-SeqRemoveFunc-6">
|
|
237
|
+
<description> A test whose essence is: `remove(("one", 2, 3), 1) instance of xs:integer+`. </description>
|
|
238
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
239
|
+
<test>remove(("one", 2, 3), 1) instance of xs:integer+</test>
|
|
240
|
+
<result>
|
|
241
|
+
<assert-true/>
|
|
242
|
+
</result>
|
|
243
|
+
</test-case>
|
|
244
|
+
|
|
245
|
+
<test-case name="K-SeqRemoveFunc-7">
|
|
246
|
+
<description> A test whose essence is: `remove((1, "two", 3), 2) instance of xs:integer+`. </description>
|
|
247
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
248
|
+
<test>remove((1, "two", 3), 2) instance of xs:integer+</test>
|
|
249
|
+
<result>
|
|
250
|
+
<assert-true/>
|
|
251
|
+
</result>
|
|
252
|
+
</test-case>
|
|
253
|
+
|
|
254
|
+
<test-case name="K-SeqRemoveFunc-8">
|
|
255
|
+
<description> A test whose essence is: `remove((1, 2, "three"), 3) instance of xs:integer+`. </description>
|
|
256
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
257
|
+
<test>remove((1, 2, "three"), 3) instance of xs:integer+</test>
|
|
258
|
+
<result>
|
|
259
|
+
<assert-true/>
|
|
260
|
+
</result>
|
|
261
|
+
</test-case>
|
|
262
|
+
|
|
263
|
+
<test-case name="K-SeqRemoveFunc-9">
|
|
264
|
+
<description> A test whose essence is: `count(remove(("one", 2, 3), 1)) eq 2`. </description>
|
|
265
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
266
|
+
<test>count(remove(("one", 2, 3), 1)) eq 2</test>
|
|
267
|
+
<result>
|
|
268
|
+
<assert-true/>
|
|
269
|
+
</result>
|
|
270
|
+
</test-case>
|
|
271
|
+
|
|
272
|
+
<test-case name="K-SeqRemoveFunc-10">
|
|
273
|
+
<description> A test whose essence is: `count(remove((1, "two", 3), 2)) eq 2`. </description>
|
|
274
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
275
|
+
<test>count(remove((1, "two", 3), 2)) eq 2</test>
|
|
276
|
+
<result>
|
|
277
|
+
<assert-true/>
|
|
278
|
+
</result>
|
|
279
|
+
</test-case>
|
|
280
|
+
|
|
281
|
+
<test-case name="K-SeqRemoveFunc-11">
|
|
282
|
+
<description> A test whose essence is: `count(remove((1, 2, "three"), 3)) eq 2`. </description>
|
|
283
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
284
|
+
<test>count(remove((1, 2, "three"), 3)) eq 2</test>
|
|
285
|
+
<result>
|
|
286
|
+
<assert-true/>
|
|
287
|
+
</result>
|
|
288
|
+
</test-case>
|
|
289
|
+
|
|
290
|
+
<test-case name="K-SeqRemoveFunc-12">
|
|
291
|
+
<description> A test whose essence is: `remove((3.1, "four"), 1)`. </description>
|
|
292
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
293
|
+
<test>remove((3.1, "four"), 1)</test>
|
|
294
|
+
<result>
|
|
295
|
+
<assert-eq>"four"</assert-eq>
|
|
296
|
+
</result>
|
|
297
|
+
</test-case>
|
|
298
|
+
|
|
299
|
+
<test-case name="K-SeqRemoveFunc-13">
|
|
300
|
+
<description> A test whose essence is: `remove(error(), 1)`. </description>
|
|
301
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
302
|
+
<test>remove(error(), 1)</test>
|
|
303
|
+
<result>
|
|
304
|
+
<any-of>
|
|
305
|
+
<error code="FOER0000"/>
|
|
306
|
+
<error code="XPST0005"/>
|
|
307
|
+
</any-of>
|
|
308
|
+
</result>
|
|
309
|
+
</test-case>
|
|
310
|
+
|
|
311
|
+
<test-case name="K-SeqRemoveFunc-14">
|
|
312
|
+
<description> Combine fn:remove() with operator 'eq'. </description>
|
|
313
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
314
|
+
<test>remove((5, 1e0), 2) eq 5</test>
|
|
315
|
+
<result>
|
|
316
|
+
<any-of>
|
|
317
|
+
<assert-true/>
|
|
318
|
+
<error code="XPTY0004"/>
|
|
319
|
+
</any-of>
|
|
320
|
+
</result>
|
|
321
|
+
</test-case>
|
|
322
|
+
|
|
323
|
+
<test-case name="K-SeqRemoveFunc-15">
|
|
324
|
+
<description> Combine fn:remove() with operator 'eq'. </description>
|
|
325
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
326
|
+
<test>5 eq remove((5, 1e0), 2)</test>
|
|
327
|
+
<result>
|
|
328
|
+
<any-of>
|
|
329
|
+
<assert-true/>
|
|
330
|
+
<error code="XPTY0004"/>
|
|
331
|
+
</any-of>
|
|
332
|
+
</result>
|
|
333
|
+
</test-case>
|
|
334
|
+
|
|
335
|
+
<test-case name="K-SeqRemoveFunc-16">
|
|
336
|
+
<description> Combine remove(), with a predicate and the 'eq' operator. </description>
|
|
337
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
338
|
+
<test>deep-equal((1, 2), (1, 2)[remove((true(), "a string"), 2)]) eq 0</test>
|
|
339
|
+
<result>
|
|
340
|
+
<error code="XPTY0004"/>
|
|
341
|
+
</result>
|
|
342
|
+
</test-case>
|
|
343
|
+
|
|
344
|
+
<test-case name="K-SeqRemoveFunc-17">
|
|
345
|
+
<description> Combine fn:remove() with operator 'eq'. </description>
|
|
346
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
347
|
+
<test>remove((4, xs:untypedAtomic("4")), 1) eq 4</test>
|
|
348
|
+
<result>
|
|
349
|
+
<error code="XPTY0004"/>
|
|
350
|
+
</result>
|
|
351
|
+
</test-case>
|
|
352
|
+
|
|
353
|
+
<test-case name="K-SeqRemoveFunc-18">
|
|
354
|
+
<description> Combine fn:remove() with operator 'eq'. </description>
|
|
355
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
356
|
+
<test>4 eq remove((4, xs:untypedAtomic("1")), 1)</test>
|
|
357
|
+
<result>
|
|
358
|
+
<error code="XPTY0004"/>
|
|
359
|
+
</result>
|
|
360
|
+
</test-case>
|
|
361
|
+
|
|
362
|
+
<test-case name="K-SeqRemoveFunc-19">
|
|
363
|
+
<description> An expression involving the eq operator that trigger certain optimization paths in some implementations. </description>
|
|
364
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
365
|
+
<test>count(remove(current-time(), 1)) eq 0</test>
|
|
366
|
+
<result>
|
|
367
|
+
<assert-true/>
|
|
368
|
+
</result>
|
|
369
|
+
</test-case>
|
|
370
|
+
|
|
371
|
+
<test-case name="K-SeqRemoveFunc-20">
|
|
372
|
+
<description> An expression involving the eq operator that trigger certain optimization paths in some implementations. </description>
|
|
373
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
374
|
+
<test>empty(remove(current-time(), 1))</test>
|
|
375
|
+
<result>
|
|
376
|
+
<assert-true/>
|
|
377
|
+
</result>
|
|
378
|
+
</test-case>
|
|
379
|
+
|
|
380
|
+
<test-case name="K-SeqRemoveFunc-21">
|
|
381
|
+
<description> Apply a predicate to the result of fn:remove(). </description>
|
|
382
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
383
|
+
<test>remove((1, 2, 3, current-time()), 4)[last()]</test>
|
|
384
|
+
<result>
|
|
385
|
+
<assert-eq>3</assert-eq>
|
|
386
|
+
</result>
|
|
387
|
+
</test-case>
|
|
388
|
+
|
|
389
|
+
<test-case name="K-SeqRemoveFunc-22">
|
|
390
|
+
<description> Apply a predicate to the result of fn:remove(). </description>
|
|
391
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
392
|
+
<test>remove((1, 2, 3, current-time()), 4)[last() - 1]</test>
|
|
393
|
+
<result>
|
|
394
|
+
<assert-eq>2</assert-eq>
|
|
395
|
+
</result>
|
|
396
|
+
</test-case>
|
|
397
|
+
|
|
398
|
+
<test-case name="K-SeqRemoveFunc-23">
|
|
399
|
+
<description> Apply a predicate to the result of fn:remove(). </description>
|
|
400
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
401
|
+
<test>remove((1, 2, 3, current-time()), 9)[last() - 1]</test>
|
|
402
|
+
<result>
|
|
403
|
+
<assert-eq>3</assert-eq>
|
|
404
|
+
</result>
|
|
405
|
+
</test-case>
|
|
406
|
+
|
|
407
|
+
<test-case name="K-SeqRemoveFunc-24">
|
|
408
|
+
<description> Apply a predicate to the result of fn:remove(). </description>
|
|
409
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
410
|
+
<test>empty(remove((1, 2, 3, current-time()), 9)[last() - 10])</test>
|
|
411
|
+
<result>
|
|
412
|
+
<assert-true/>
|
|
413
|
+
</result>
|
|
414
|
+
</test-case>
|
|
415
|
+
|
|
416
|
+
<test-case name="K-SeqRemoveFunc-25">
|
|
417
|
+
<description> Index must be an integer. </description>
|
|
418
|
+
<created by="Michael Kay" on="2017-11-24"/>
|
|
419
|
+
<test>remove(1 to 10, 1.0)</test>
|
|
420
|
+
<result>
|
|
421
|
+
<error code="XPTY0004"/>
|
|
422
|
+
</result>
|
|
423
|
+
</test-case>
|
|
424
|
+
|
|
425
|
+
<test-case name="K-SeqRemoveFunc-26">
|
|
426
|
+
<description> Index must be an integer. </description>
|
|
427
|
+
<created by="Michael Kay" on="2017-11-24"/>
|
|
428
|
+
<test>remove(1 to 10, 1.0e0)</test>
|
|
429
|
+
<result>
|
|
430
|
+
<error code="XPTY0004"/>
|
|
431
|
+
</result>
|
|
432
|
+
</test-case>
|
|
433
|
+
|
|
434
|
+
<test-case name="K-SeqRemoveFunc-27">
|
|
435
|
+
<description> Index must be an integer. </description>
|
|
436
|
+
<created by="Michael Kay" on="2017-11-24"/>
|
|
437
|
+
<test>remove(1 to 10, "1")</test>
|
|
438
|
+
<result>
|
|
439
|
+
<error code="XPTY0004"/>
|
|
440
|
+
</result>
|
|
441
|
+
</test-case>
|
|
442
|
+
|
|
443
|
+
<test-case name="cbcl-fn-remove-001">
|
|
444
|
+
<description> Tests with non-value position </description>
|
|
445
|
+
<created by="Nick Jones" on="2008-06-16"/>
|
|
446
|
+
<test>remove(1 to 10,exactly-one((1 to 10)[. div 2 = 2]))</test>
|
|
447
|
+
<result>
|
|
448
|
+
<assert-string-value>1 2 3 5 6 7 8 9 10</assert-string-value>
|
|
449
|
+
</result>
|
|
450
|
+
</test-case>
|
|
451
|
+
|
|
452
|
+
<test-case name="cbcl-fn-remove-002">
|
|
453
|
+
<description> Tests removal from range value </description>
|
|
454
|
+
<created by="Nick Jones" on="2008-06-16"/>
|
|
455
|
+
<test>remove(1 to 10,4)</test>
|
|
456
|
+
<result>
|
|
457
|
+
<assert-string-value>1 2 3 5 6 7 8 9 10</assert-string-value>
|
|
458
|
+
</result>
|
|
459
|
+
</test-case>
|
|
460
|
+
|
|
461
|
+
<test-case name="cbcl-fn-remove-003">
|
|
462
|
+
<description> Tests removal from non-range value </description>
|
|
463
|
+
<created by="Nick Jones" on="2008-06-16"/>
|
|
464
|
+
<test>remove((1 to 10)[. mod 2 = 0],4)</test>
|
|
465
|
+
<result>
|
|
466
|
+
<assert-string-value>2 4 6 10</assert-string-value>
|
|
467
|
+
</result>
|
|
468
|
+
</test-case>
|
|
469
|
+
|
|
470
|
+
<test-case name="cbcl-fn-remove-004">
|
|
471
|
+
<description> Tests removal from a sequence of values </description>
|
|
472
|
+
<created by="Nick Jones" on="2008-06-16"/>
|
|
473
|
+
<test>
|
|
474
|
+
remove(((1 to 10)[. mod 2 = 0],"blah",(1 to 10)[. mod 2 = 0]),4)
|
|
475
|
+
</test>
|
|
476
|
+
<result>
|
|
477
|
+
<assert-string-value>2 4 6 10 blah 2 4 6 8 10</assert-string-value>
|
|
478
|
+
</result>
|
|
479
|
+
</test-case>
|
|
480
|
+
</test-set>
|