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