Commit 2a0ddd42 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Kamil Kisiel

fixup! decoder: Fix thinko in PROTO opcode handling (#41) (#42)

Add a test that excersizes whether invalid protocol version is caught
and reported. Without 5c420f85 the test fails like this:

	--- FAIL: TestDecodeError (0.00s)
	    ogorek_test.go:312: "\x80\xffI1\n.": no decode error  ; got 1, <nil>
parent 5c420f85
......@@ -296,6 +296,9 @@ func TestDecodeError(t *testing.T) {
// invalid long format
"L123\n.",
"L12qL\n.",
// invalid protocol version
"\x80\xffI1\n.",
}
for _, tt := range testv {
buf := bytes.NewBufferString(tt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment