Skip to content

Commit d228a37

Browse files
committed
[test] Tests for different ways of using XQSuite via XSuite
1 parent 9f68b42 commit d228a37

File tree

4 files changed

+110
-0
lines changed

4 files changed

+110
-0
lines changed

exist-core/src/test/resources-filtered/conf.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,10 @@
888888
raise-error-on-failed-retrieval="no">
889889

890890
<builtin-modules>
891+
892+
<!-- XQSuite Test Framework for XQuery testing -->
893+
<module uri="http://exist-db.org/xquery/xqsuite" src="resource:org/exist/xquery/lib/xqsuite/xqsuite.xql" />
894+
891895
<module uri="http://www.w3.org/2005/xpath-functions/map" class="org.exist.xquery.functions.map.MapModule" />
892896
<module uri="http://www.w3.org/2005/xpath-functions/math" class="org.exist.xquery.functions.math.MathModule" />
893897
<module uri="http://www.w3.org/2005/xpath-functions/array" class="org.exist.xquery.functions.array.ArrayModule" />
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
(:
2+
: eXist-db Open Source Native XML Database
3+
: Copyright (C) 2001 The eXist-db Authors
4+
:
5+
6+
: http://www.exist-db.org
7+
:
8+
: This library is free software; you can redistribute it and/or
9+
: modify it under the terms of the GNU Lesser General Public
10+
: License as published by the Free Software Foundation; either
11+
: version 2.1 of the License, or (at your option) any later version.
12+
:
13+
: This library is distributed in the hope that it will be useful,
14+
: but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
: Lesser General Public License for more details.
17+
:
18+
: You should have received a copy of the GNU Lesser General Public
19+
: License along with this library; if not, write to the Free Software
20+
: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21+
:)
22+
xquery version "3.1";
23+
24+
(:~
25+
: Test for using XQSuite from XSuite via `declare namespace`.
26+
:)
27+
module namespace xsdxq = "http://exist-db.org/xquery/test/xqsuite-import-xqsuite-location";
28+
29+
declare namespace test = "http://exist-db.org/xquery/xqsuite";
30+
31+
declare
32+
%test:assertTrue
33+
function xsdxq:ok() {
34+
fn:true()
35+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
(:
2+
: eXist-db Open Source Native XML Database
3+
: Copyright (C) 2001 The eXist-db Authors
4+
:
5+
6+
: http://www.exist-db.org
7+
:
8+
: This library is free software; you can redistribute it and/or
9+
: modify it under the terms of the GNU Lesser General Public
10+
: License as published by the Free Software Foundation; either
11+
: version 2.1 of the License, or (at your option) any later version.
12+
:
13+
: This library is distributed in the hope that it will be useful,
14+
: but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
: Lesser General Public License for more details.
17+
:
18+
: You should have received a copy of the GNU Lesser General Public
19+
: License along with this library; if not, write to the Free Software
20+
: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21+
:)
22+
xquery version "3.1";
23+
24+
(:~
25+
: Test for using XQSuite from XSuite via `import module` with a location hint.
26+
:)
27+
module namespace xsixql = "http://exist-db.org/xquery/test/xqsuite-import-xqsuite-location";
28+
29+
import module namespace test = "http://exist-db.org/xquery/xqsuite"
30+
at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql";
31+
32+
declare
33+
%test:assertTrue
34+
function xsixql:ok() {
35+
fn:true()
36+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
(:
2+
: eXist-db Open Source Native XML Database
3+
: Copyright (C) 2001 The eXist-db Authors
4+
:
5+
6+
: http://www.exist-db.org
7+
:
8+
: This library is free software; you can redistribute it and/or
9+
: modify it under the terms of the GNU Lesser General Public
10+
: License as published by the Free Software Foundation; either
11+
: version 2.1 of the License, or (at your option) any later version.
12+
:
13+
: This library is distributed in the hope that it will be useful,
14+
: but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
: Lesser General Public License for more details.
17+
:
18+
: You should have received a copy of the GNU Lesser General Public
19+
: License along with this library; if not, write to the Free Software
20+
: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21+
:)
22+
xquery version "3.1";
23+
24+
(:~
25+
: Test for using XQSuite from XSuite via `import module` with no location hint.
26+
:)
27+
module namespace xsixqnl = "http://exist-db.org/xquery/test/xqsuite-import-xqsuite-no-location";
28+
29+
import module namespace test = "http://exist-db.org/xquery/xqsuite";
30+
31+
declare
32+
%test:assertTrue
33+
function xsixqnl:ok() {
34+
fn:true()
35+
};

0 commit comments

Comments
 (0)