(t *testing.T)
| 101 | test_xpath_eval(t, book_example, `string(//book/@category)`, "cooking") |
| 102 | } |
| 103 | func Test_func_string_empty(t *testing.T) { |
| 104 | // https://github.com/antchfx/xpath/issues/113 |
| 105 | // Create the equivalent of <div>hi</div> using TNode |
| 106 | doc := createNode("", RootNode) |
| 107 | div := doc.createChildNode("div", ElementNode) |
| 108 | div.lines = 1 // Assign a line number for the test helper |
| 109 | div.createChildNode("hi", TextNode) |
| 110 | |
| 111 | // Use the existing test helper to evaluate the XPath |
| 112 | // The expression selects the div if its string value ("hi") is true in a boolean context. |
| 113 | test_xpath_values(t, doc, `//div[string()]`, "hi") |
| 114 | } |
| 115 | |
| 116 | func Test_func_string_join(t *testing.T) { |
| 117 | //(t, empty_example, `string-join(('Now', 'is', 'the', 'time', '...'), '')`, "Now is the time ...") |
nothing calls this directly
no test coverage detected
searching dependent graphs…