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