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