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

Function TestIsBinary_UTF8Text

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

Source from the content-addressed store, hash-verified

278}
279
280func TestIsBinary_UTF8Text(t *testing.T) {
281 if IsBinary([]byte("こんにちは世界")) {
282 t.Error("valid UTF-8 should not be binary")
283 }
284}
285
286func TestIsBinary_NulByte(t *testing.T) {
287 if !IsBinary([]byte("hello\x00world")) {

Callers

nothing calls this directly

Calls 2

IsBinaryFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected