Skip to content

Commit 08ce0d4

Browse files
committed
fix(testsuite): orphan link test
1 parent 67bc212 commit 08ce0d4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/main/xar-resources/data/lucene/lucene.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@
514514
a field with type <literal>xs:date</literal>, make sure to retrieve it with <literal>ft:field($node, "date", "xs:date")</literal>, otherwise all
515515
you get is a number.</para>
516516
</sect2>
517-
<sect2>
517+
<sect2 xml:id="display-facets">
518518
<title>Displaying Facet Counts</title>
519519
<para>Facet counts for the query result can be retrieved if facets are associated with
520520
an indexed parent element. Facet counts for a particular dimension are available as
@@ -539,7 +539,7 @@
539539
month and so on. <code>ft:facets($node, "date", (), ("2018", "06"))</code> will thus
540540
return facet counts for all days in June 2018.</para>
541541
</sect2>
542-
<sect2>
542+
<sect2 xml:id="refine-facets">
543543
<title>Refining a Query with Facets</title>
544544
<para>The main purpose of facets is to quickly narrow down a query result, limiting it
545545
to only items which match a certain facet value. To drill down by a given facet

src/main/xar-resources/modules/test-suite.xql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ function tests:orphan-listing() {
4242
let $report := diag:diagnose(<root/>, map{1: 1})
4343
let $error := $report//ul//span[. eq '*ERROR* ']
4444
let $error-msg := count($error)
45-
let $art := $error/ancestor::li/h3/code/string()
46-
let $list := $error/ancestor::tr//code[1]/string()
45+
let $list := $error/ancestor::tr//code[1]
4746
return
4847
if ($error-msg > 0)
49-
then ( $list || ' is missing in ' || $art )
48+
then (
49+
for $l in $list
50+
return
51+
$l || ' is missing in ' || $l/ancestor::li/h3/code)
5052
else ()
5153
};

0 commit comments

Comments
 (0)