(t *testing.T)
| 319 | } |
| 320 | |
| 321 | func TestEncodeBytea(t *testing.T) { |
| 322 | have, err := encode([]byte("\\x\x00\x01\x02\xFF\xFEabcdefg0123"), oid.T_bytea) |
| 323 | if err != nil { |
| 324 | t.Fatal(err) |
| 325 | } |
| 326 | if want := []byte("\\x5c78000102fffe6162636465666730313233"); !bytes.Equal(want, have) { |
| 327 | t.Errorf("\nhave: %v\nwant: %v", have, want) |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | func TestByteaOutputFormats(t *testing.T) { |
| 332 | t.Parallel() |