blob: 00c2bcafe6d63198812b166d3df559adc7cf7e69 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package sideband64k_test
import (
"errors"
"strings"
"testing"
"lindenii.org/go/furgit/network/protocol/sideband64k"
)
func TestDecoderInvalidBand(t *testing.T) {
t.Parallel()
dec := sideband64k.NewDecoder(strings.NewReader("0005\x04"), sideband64k.ReadOptions{})
_, err := dec.ReadFrame()
if _, ok := errors.AsType[*sideband64k.ProtocolError](err); !ok {
t.Fatalf("got err %v, want ProtocolError", err)
}
}
|