MCPcopy
hub / github.com/rs/zerolog / TestHTMLNoEscaping

Function TestHTMLNoEscaping

log_test.go:1450–1457  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1448}
1449
1450func TestHTMLNoEscaping(t *testing.T) {
1451 out := &bytes.Buffer{}
1452 log := New(out)
1453 log.Log().Interface("head", "<test>").Send()
1454 if got, want := decodeIfBinaryToString(out.Bytes()), `{"head":"<test>"}`+"\n"; got != want {
1455 t.Errorf("invalid log output:\ngot: %v\nwant: %v", got, want)
1456 }
1457}

Callers

nothing calls this directly

Calls 6

NewFunction · 0.85
SendMethod · 0.80
decodeIfBinaryToStringFunction · 0.70
LogMethod · 0.65
InterfaceMethod · 0.45
BytesMethod · 0.45

Tested by

no test coverage detected