| url | test | status |
|---|---|---|
| /resources | pass | 200 |
| /resources/ | fail | 405 |
| /resources?query=a | pass | 200 |
| /resources/?query=a | fail | 405 |
| /resources/a | pass | 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| declare variable $exist:controller external; | |
| declare variable $exist:path external; | |
| declare variable $local:map := map { 'a': 'b', 'c': 'd', 'e': 'f' }; | |
| if (contains($exist:path, 'map-for-each')) | |
| then ( | |
| (: this will not set the parameters :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| declare function local:plusOne ($a as xs:integer) { $a + 1 }; | |
| declare | |
| function local:greaterThan ($int as xs:integer, $cmp as xs:integer) as xs:boolean { | |
| $int > $cmp | |
| }; | |
| declare function local:gt ($cmp as xs:integer) as function(*) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version '3.1'; | |
| (:~ | |
| this script must be run with a user in the DBA group | |
| add this line to your post-install script or run it manually | |
| it will set the GID sticky bit | |
| chown('/path/to/this/script.xq', 'admin', 'dba') | |
| chmod('/path/to/this/script.xq', 'rwxr-S---') | |
| :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __=`${![]}` | |
| ___=`${!![]}` | |
| ____=`${''[[]]}` | |
| _____=`${{}}` | |
| $={_:[]|[],$:!![]|[],$_:!![]<<!![],$$:!![]<<!![]|!![],$__:!![]<<!![]<<!![],$_$:!![]<<!![]<<!![]|!![],$$_:!![]<<!![]<<!![]|!![]<<!![],$$$:!![]<<!![]<<!![]|!![]<<!![]|!![],$___:!![]<<!![]<<!![]<<!![],$__$:!![]<<!![]<<!![]<<!![]|!![],$_$_:__[!![]|[]],$_$$:_____[!![]<<!![]],$$__:_____[!![]<<!![]<<!![]|!![]],$$_$:____[!![]<<!![]],$$$_:__[!![]<<!![]<<!![]],$$$$:__[[]|[]]} | |
| $_=_$=>_$[`${_____[$.$$]}${_____[$.$]}${____[$.$_$]}${____[$.$]}`]('') | |
| $$=$_([_____[$.$_$],_____[$.$],____[$.$],__[$.$$],___[$._],___[$.$],____[$._],_____[$.$_$],___[$._],_____[$.$],___[$.$]]) | |
| _=_$=>[][$$][$$]($_([___[$.$],__[$.$__],___[$._],___[$.$_],___[$.$],____[$.$],'"\\',___[$.$_],'{',$_(_$),'}"']))() | |
| ![][$$][$$]($_([_____[$.$_$],_____[$.$],____[$.$],__[$.$$],_____[$.$],__[$.$_],__[$.$__],'.',__[$.$_],_____[$.$],_([$.$$_,$.$$$]),'(',_([$.$$$,$._]),___[$.$],_____[$.$],_____[$.$_$],___[$.$$],__[$.$$],__[$.$$],',"',_([$.$,$.$$$$,$.$__,$.$$$,$.$_$$]),'",$,`${_}`,`${$_}`)']))() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| module namespace xg="http://existdb.org/xq/grammar"; | |
| declare namespace test="http://exist-db.org/xquery/xqsuite"; | |
| declare | |
| %test:pending | |
| %test:assertEquals("<root a='a'/>") | |
| function xg:literalString() { | |
| (: | |
| : since the line below raises a static error, it cannot be tested this way |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| (:~ | |
| these tests were created because of | |
| https://github.com/eXist-db/exist/issues/2308 | |
| ~:) | |
| module namespace boolseq="http://exist-db.org/xquery/xqsuite/boolseq"; | |
| declare namespace test="http://exist-db.org/xquery/xqsuite"; | |
| declare variable $boolseq:sequence := (true(), false(), true()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| declare namespace io = "http://io"; | |
| (: IO version of get-char :) | |
| declare function local:get-char() as map(*) { | |
| local:create-io(function($realworld as element(io:realworld)) { | |
| ($realworld, 123) | |
| }) | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| import module namespace imfd='http://existsolutions.com/apps/imfd' at '/db/temp/imfd.xqm'; | |
| let $now := current-dateTime() | |
| let $tz := timezone-from-dateTime($now) | |
| let $imfd := imfd:format($now) | |
| let $gmt := imfd:to-dateTime($imfd) | |
| let $reversed := adjust-dateTime-to-timezone($gmt + $tz, $tz) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "3.1"; | |
| declare function local:random-number () { | |
| util:random(1000000000) div 1000000000 | |
| }; | |
| declare function local:random-number-generator () { | |
| map { | |
| 'number': local:random-number(), | |
| 'next': local:random-number-generator#0, |