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

Function TestAttributes

xpath_expression_test.go:63–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestAttributes(t *testing.T) {
64 test_xpath_tags(t, html_example.FirstChild, "@*", "lang")
65 test_xpath_count(t, employee_example, `//@*`, 9)
66 test_xpath_values(t, employee_example, `//@discipline`, "web", "DBA", "appdev")
67 test_xpath_count(t, employee_example, `//employee/@id`, 3)
68}
69
70func TestExpressions(t *testing.T) {
71 test_xpath_elements(t, book_example, `//book[@category = "cooking"] | //book[@category = "children"]`, 3, 9)

Callers

nothing calls this directly

Calls 3

test_xpath_tagsFunction · 0.85
test_xpath_countFunction · 0.85
test_xpath_valuesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…