Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
896fb7bb
Commit
896fb7bb
authored
Oct 24, 2018
by
MRodz
Committed by
mrodzis
Feb 05, 2019
Browse files
Update tests
parent
cfe00a35
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/tests/index-info-test.xql
View file @
896fb7bb
...
...
@@ -21,17 +21,17 @@ declare
declare
%test:name("Events: Full references")
%test:args("eve:Thesenanschlag", "eve")
%test:args("eve:Thesenanschlag", "eve"
, "regular-name"
)
%test:assertEquals("Thesenanschlag")
function index-info-test:places-full-reference($
node
as xs:string, $
type
as xs:string) {
index-info:get-
full-ref($node, $type
)
function index-info-test:places-full-reference($
term
as xs:string, $
index-type as xs:string, $info
as xs:string) {
index-info:get-
info-about($index-type, $term, $info
)
};
declare
%test:name("Events: Full references - transformation result")
%test:args("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""eve:Thesenanschlag""/>")
%test:assertEquals("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""eve:Thesenanschlag""
full-ref
-1=""Thesenanschlag"" place-1=""plc:Kirche_Wittenberg"" occs-1=""""/>")
%test:assertEquals("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""eve:Thesenanschlag""
regular-name
-1=""Thesenanschlag"" place-1=""plc:Kirche_Wittenberg"" occs-1=""""/>")
function index-info-test:places-full-reference-xml($node as element(*)) {
fontaneSimple:transform($node)
...
...
@@ -39,34 +39,34 @@ declare
declare
%test:name("Events: Places")
%test:args("eve:Thesenanschlag")
%test:args("eve:Thesenanschlag"
, "eve", "place"
)
%test:assertEquals("plc:Kirche_Wittenberg")
function index-info-test:places-full-reference($
node
as xs:string) {
index-info:get-
event-place($node
)
function index-info-test:places-full-reference($
term as xs:string, $index-type as xs:string, $info
as xs:string) {
index-info:get-
info-about($index-type, $term, $info
)
};
declare
%test:name("Places: Full references")
%test:args("plc:Thueringen", "plc")
%test:args("plc:Thueringen", "plc"
, "regular-name"
)
%test:assertEquals("Thüringen")
(: entry with several variant names :)
%test:args("plc:Albaner_Berge", "plc")
%test:args("plc:Albaner_Berge", "plc"
, "regular-name"
)
%test:assertEquals("Albaner Berge (ital.: Colli Albani), Albanergebirge")
function index-info-test:places-full-reference($
node
as xs:string, $
type
as xs:string) {
index-info:get-
full-ref($node, $type
)
function index-info-test:places-full-reference($
term
as xs:string, $
index-type as xs:string, $info
as xs:string) {
index-info:get-
info-about($index-type, $term, $info
)
};
declare
%test:name("Places: Subreferences")
%test:args("plc:Sacro_Convento_Assisi")
%test:args("plc:Sacro_Convento_Assisi"
, "plc", "subref-of"
)
%test:assertEquals("Assisi")
%test:args("plc:Thueringen")
%test:args("plc:Thueringen"
, "plc", "subref-of"
)
%test:assertEquals("")
function index-info-test:places-sub-reference($
node
as xs:string) {
index-info:get-
place-sub-ref($node
)
function index-info-test:places-sub-reference($
term as xs:string, $index-type as xs:string, $info
as xs:string) {
index-info:get-
info-about($index-type, $term, $info
)
};
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment