MCPcopy Create free account
hub / github.com/antchfx/xpath / Test_func_concat

Function Test_func_concat

xpath_function_test.go:42–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func Test_func_concat(t *testing.T) {
43 test_xpath_eval(t, empty_example, `concat("1", "2", "3")`, "123")
44 //test_xpath_eval(t, empty_example, `concat("Ciao!", ())`, "Ciao!")
45 test_xpath_eval(t, book_example, `concat(//book[1]/title, ", ", //book[1]/year)`, "Everyday Italian, 2005")
46 result := concatFunc(testQuery("a"), testQuery("b"))(nil, nil).(string)
47 assertEqual(t, result, "ab")
48}
49
50func Test_func_contains(t *testing.T) {
51 test_xpath_eval(t, empty_example, `contains("tattoo", "t")`, true)

Callers

nothing calls this directly

Calls 4

test_xpath_evalFunction · 0.85
concatFuncFunction · 0.85
testQueryTypeAlias · 0.85
assertEqualFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…