MCPcopy
hub / github.com/mikefarah/yq / TestUriDecoder_DecodeInvalidEscape

Function TestUriDecoder_DecodeInvalidEscape

pkg/yqlib/decoder_uri_test.go:100–111  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestUriDecoder_DecodeInvalidEscape(t *testing.T) {
101 decoder := NewUriDecoder()
102 reader := strings.NewReader("test%ZZ")
103 err := decoder.Init(reader)
104 test.AssertResult(t, nil, err)
105
106 _, err = decoder.Decode()
107 // Should return an error for invalid escape sequence
108 if err == nil {
109 t.Error("Expected error for invalid escape sequence, got nil")
110 }
111}
112
113func TestUriDecoder_DecodeSlashAndQuery(t *testing.T) {
114 decoder := NewUriDecoder()

Callers

nothing calls this directly

Calls 5

AssertResultFunction · 0.92
ErrorMethod · 0.80
NewUriDecoderFunction · 0.70
InitMethod · 0.65
DecodeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…