We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 961d864 commit 852fe9aCopy full SHA for 852fe9a
test/src/xquery/arrays/arrays.xql
@@ -136,12 +136,28 @@ function arr:function-item-invalid() {
136
137
declare
138
%test:assertError("FOAY0001")
139
-function arr:get-item-out-of-bounds() {
+function arr:get-item-out-of-bounds-positive() {
140
let $a := [13, 10, 14]
141
return
142
array:get($a, 22)
143
};
144
145
+declare
146
+ %test:assertError("FOAY0001")
147
+function arr:get-item-out-of-bounds-zero() {
148
+ let $a := [13, 10, 14]
149
+ return
150
+ array:get($a, 0)
151
+};
152
+
153
154
155
+function arr:get-item-out-of-bounds-negative() {
156
157
158
+ array:get($a, -1)
159
160
161
162
%test:args(1)
163
%test:assertEmpty
0 commit comments