Commit 6ad3a8fb authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

test tear down.

parent 0ef40e4a
...@@ -161,11 +161,11 @@ declare function config:mkcol($path) { ...@@ -161,11 +161,11 @@ declare function config:mkcol($path) {
if(not(starts-with($path, "/"))) if(not(starts-with($path, "/")))
then error(QName("error", "path"), "Invalid path. Absolute path required.") then error(QName("error", "path"), "Invalid path. Absolute path required.")
else else
if($path => matches("[^a-zA-Z0-9\-\.\+]")) if($path => matches("[^a-zA-Z0-9\-\.\+/]"))
then error(QName("error", "charset"), "Invalid path. use characters that match [a-zA-Z0-9\-\.\+] only.") then error(QName("error", "charset"), "Invalid path. use characters that match [a-zA-Z0-9\-\.\+/] only.")
else else
let $components := tokenize($path, "/")[.!=""] let $components := tokenize($path, "/")[.!=""]
return return
local:mkcol-recursive($components[1], subsequence($components, 2)) local:mkcol-recursive("/" || $components[1], subsequence($components, 2))
}; };
...@@ -44,6 +44,11 @@ else ...@@ -44,6 +44,11 @@ else
update insert $data/* into $doc//tei:body update insert $data/* into $doc//tei:body
return true() return true()
}; };
declare
%test:tearDown
function f-misc:teardown(){
xmldb:remove("/db/sade-projects")
};
(: Main cache function (: Main cache function
: @return path to the cached document :) : @return path to the cached document :)
......
...@@ -26,6 +26,11 @@ function f-misc:setup(){ ...@@ -26,6 +26,11 @@ function f-misc:setup(){
xmldb:store($create/@collection, $create/@name, $create/*) xmldb:store($create/@collection, $create/@name, $create/*)
return true() return true()
}; };
declare
%test:tearDown
function f-misc:teardown(){
xmldb:remove("/db/sade-projects")
};
declare declare
%test:arg("baseUri","textgrid:16b00") %test:assertEquals("Notizbuch C7") %test:arg("baseUri","textgrid:16b00") %test:assertEquals("Notizbuch C7")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment