Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects

feat: refactor TextAPI (cf. #50)

Merged Michelle Weidling requested to merge feature/#50-refactor-api into develop
2 unresolved threads
2 files
+ 10
12
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -11,6 +11,14 @@ declare variable $ttt:sample-file := local:open-file("ahiqar_sample");
declare variable $ttt:sample-transliteration := $ttt:sample-file//tei:text[@type = "transliteration"];
declare variable $ttt:sample-transcription := $ttt:sample-file//tei:text[@type = "transcription"];
declare
%test:setUp
function ttt:_test-setup()
as xs:string+ {
tapi-txt:main()
};
declare
%test:args("ahiqar_sample") %test:assertExists
%test:args("1234") %test:assertError("org.exist.xquery.XPathException")
@@ -434,23 +442,14 @@ as element() {
};
declare
%test:args("ahiqar_sample")
%test:assertEquals("text/xml")
%test:args("ahiqar_sample") %test:assertEquals("text/xml")
%test:args("ahiqar_agg") %test:assertEquals("text/tg.edition+tg.aggregation+xml")
function ttt:tgmd-format($uri as xs:string)
as xs:string {
tapi-txt:get-format($uri)
};
declare
%test:args("ahiqar_sample")
%test:assertEquals("text/xml")
function ttt:tgmd-format($uri as xs:string) as xs:string {
tapi-txt:get-format($uri)
};
declare
%test:args("ahiqar_sample", "transcription")
%test:assertXPath("$result[local-name(.) = 'text' and @type = 'transcription']")
Loading