Skip to content

Commit 56d8e60

Browse files
feat(#213): add one more test for string-join
1 parent 43998c9 commit 56d8e60

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

src/test/java/com/jcabi/xml/SaxonDocumentTest.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,24 @@
4040
final class SaxonDocumentTest {
4141

4242
@Test
43-
void findsXpathWithFunctionThatReturnsSeveralItems() {
43+
void findsXpathWithConcatFunctionThatReturnsSeveralItems() {
4444
MatcherAssert.assertThat(
45-
"XMLDocument can handle XPath 2.0 feature - XPath evaluation of concat method, but it can't",
45+
"SaxonDocument can handle XPath 2.0 feature - XPath evaluation of concat method, but it can't",
4646
new SaxonDocument(
4747
"<o><o base='a' ver='1'/><o base='b' ver='2'/></o>"
4848
).xpath("//o[@base and @ver]/concat(@base,'|',@ver)"),
4949
Matchers.hasItems("a|1", "b|2")
5050
);
5151
}
52+
53+
@Test
54+
void findsXpathWithStringJoinFunctionThatReturnsSeveralItems() {
55+
MatcherAssert.assertThat(
56+
"SaxonDocument can handle XPath 2.0 feature - XPath evaluation of string-join method, but it can't",
57+
new SaxonDocument(
58+
"<o><o base='a'/><o base='b' ver='2'/><o base='c'/></o>"
59+
).xpath("//o[@base]/string-join((@base,@ver),'|')"),
60+
Matchers.hasItems("a", "b|2", "c")
61+
);
62+
}
5263
}

0 commit comments

Comments
 (0)