Skip to content

Commit 892f7bb

Browse files
committed
[bugfix] Avoid reserved keyword
1 parent 9508708 commit 892f7bb

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

exist-core/src/test/xquery/count.xql

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,43 @@
2222
xquery version "3.0";
2323

2424
(:~ Additional tests for the fn:count function :)
25-
module namespace count="http://exist-db.org/xquery/test/count";
25+
module namespace cnt="http://exist-db.org/xquery/test/count";
2626

2727
declare namespace test="http://exist-db.org/xquery/xqsuite";
2828

2929
import module namespace xmldb="http://exist-db.org/xquery/xmldb";
3030

31-
declare variable $count:TEST_COLLECTION_NAME := "test-count";
32-
declare variable $count:TEST_COLLECTION := "/db/" || $count:TEST_COLLECTION_NAME;
33-
declare variable $count:COLLECTION1_NAME := "test-count-1";
34-
declare variable $count:COLLECTION2_NAME := "test-count-2";
35-
declare variable $count:COLLECTION1 := $count:TEST_COLLECTION || "/" || $count:COLLECTION1_NAME;
36-
declare variable $count:COLLECTION2 := $count:TEST_COLLECTION || "/" || $count:COLLECTION2_NAME;
31+
declare variable $cnt:TEST_COLLECTION_NAME := "test-count";
32+
declare variable $cnt:TEST_COLLECTION := "/db/" || $cnt:TEST_COLLECTION_NAME;
33+
declare variable $cnt:COLLECTION1_NAME := "test-count-1";
34+
declare variable $cnt:COLLECTION2_NAME := "test-count-2";
35+
declare variable $cnt:COLLECTION1 := $cnt:TEST_COLLECTION || "/" || $cnt:COLLECTION1_NAME;
36+
declare variable $cnt:COLLECTION2 := $cnt:TEST_COLLECTION || "/" || $cnt:COLLECTION2_NAME;
3737

3838
declare
3939
%test:setUp
40-
function count:setup() {
41-
xmldb:create-collection("/db", $count:TEST_COLLECTION_NAME),
42-
xmldb:create-collection($count:TEST_COLLECTION, $count:COLLECTION1_NAME),
43-
xmldb:store($count:COLLECTION1, "test1.xml", <test/>),
44-
xmldb:create-collection($count:TEST_COLLECTION, $count:COLLECTION2_NAME),
45-
xmldb:store($count:COLLECTION2, "test2xml", <test/>)
40+
function cnt:setup() {
41+
xmldb:create-collection("/db", $cnt:TEST_COLLECTION_NAME),
42+
xmldb:create-collection($cnt:TEST_COLLECTION, $cnt:COLLECTION1_NAME),
43+
xmldb:store($cnt:COLLECTION1, "test1.xml", <test/>),
44+
xmldb:create-collection($cnt:TEST_COLLECTION, $cnt:COLLECTION2_NAME),
45+
xmldb:store($cnt:COLLECTION2, "test2xml", <test/>)
4646
};
4747

4848
declare
4949
%test:tearDown
50-
function count:cleanup() {
51-
xmldb:remove($count:TEST_COLLECTION)
50+
function cnt:cleanup() {
51+
xmldb:remove($cnt:TEST_COLLECTION)
5252
};
5353

5454
declare
5555
%test:assertEquals(1, 1)
56-
function count:arg-self-on-stored() {
57-
(collection($count:COLLECTION1)/*, collection($count:COLLECTION2)/*)/count(.)
56+
function cnt:arg-self-on-stored() {
57+
(collection($cnt:COLLECTION1)/*, collection($cnt:COLLECTION2)/*)/count(.)
5858
};
5959

6060
declare
6161
%test:assertEquals(1, 1, 1)
62-
function count:arg-self-on-constructed() {
62+
function cnt:arg-self-on-constructed() {
6363
(<a/>, <b/>, <c/>)/count(.)
6464
};

0 commit comments

Comments
 (0)