MCPcopy Create free account
hub / github.com/antchfx/xmlquery / TestXPathCdUp

Function TestXPathCdUp

query_test.go:85–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83}
84
85func TestXPathCdUp(t *testing.T) {
86 doc := loadXML(`<a><b attr="1"/></a>`)
87 node := FindOne(doc, "/a/b/@attr/..")
88 t.Logf("node = %#v", node)
89 if node == nil || node.Data != "b" {
90 t.Fatal("//b/@id/.. != <b/>")
91 }
92}
93
94func TestInvalidXPathExpression(t *testing.T) {
95 doc := &Node{}

Callers

nothing calls this directly

Calls 2

loadXMLFunction · 0.85
FindOneFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…