Skip to content

Commit

Permalink
add unit tests for eutil:getDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Nov 8, 2024
1 parent dc1bc04 commit e8580b4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions testing/XQSuite/eutil-tests.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ declare
function eut:test-getLocalizedTitle($node as element(), $lang as xs:string?) as xs:string {
eutil:getLocalizedTitle($node, $lang)
};

declare
%test:arg("uri") %test:assertEmpty
%test:arg("uri", "") %test:assertEmpty
%test:args("foo") %test:assertEmpty
%test:args("https://edirom.de") %test:assertXPath("/html")
%test:args("xmldb:exist://db/apps/Edirom-Online/data/locale/edirom-lang-de.xml") %test:assertXPath("/langFile")
%test:args("/db/apps/Edirom-Online/data/locale/edirom-lang-de.xml") %test:assertXPath("/langFile")
function eut:test-getDoc($uri as xs:string?) as document-node()? {
eutil:getDoc($uri)
};

0 comments on commit e8580b4

Please sign in to comment.