MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / TestIsBinary_NulByte

Function TestIsBinary_NulByte

internal/sessions/transfer_test.go:286–290  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

284}
285
286func TestIsBinary_NulByte(t *testing.T) {
287 if !IsBinary([]byte("hello\x00world")) {
288 t.Error("data with NUL byte should be binary")
289 }
290}
291
292func TestIsBinary_InvalidUTF8(t *testing.T) {
293 if !IsBinary([]byte{0xff, 0xfe, 0x00}) {

Callers

nothing calls this directly

Calls 2

IsBinaryFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected