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

Function TestInvalidXPathExpression

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

Source from the content-addressed store, hash-verified

92}
93
94func TestInvalidXPathExpression(t *testing.T) {
95 doc := &Node{}
96 _, err := QueryAll(doc, "//a[@a==1]")
97 if err == nil {
98 t.Fatal("expected a parsed error but nil")
99 }
100 _, err = Query(doc, "//a[@a==1]")
101 if err == nil {
102 t.Fatal("expected a parsed error but nil")
103 }
104}
105
106func TestNavigator(t *testing.T) {
107 nav := &NodeNavigator{curr: doc, root: doc, attr: -1}

Callers

nothing calls this directly

Calls 2

QueryAllFunction · 0.85
QueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…