|
@@ -197,6 +197,11 @@ func TestDecode(t *testing.T) {
|
|
|
"\x08" + "\x0cabcd" + "\x01\x04",
|
|
"\x08" + "\x0cabcd" + "\x01\x04",
|
|
|
"abcdabcd",
|
|
"abcdabcd",
|
|
|
nil,
|
|
nil,
|
|
|
|
|
+ }, {
|
|
|
|
|
+ `decodedLen=8; tagLiteral (4 bytes "abcd"); tagCopy1; length=4 offset=0; zero offset`,
|
|
|
|
|
+ "\x08" + "\x0cabcd" + "\x01\x00",
|
|
|
|
|
+ "",
|
|
|
|
|
+ ErrCorrupt,
|
|
|
}, {
|
|
}, {
|
|
|
`decodedLen=9; tagLiteral (4 bytes "abcd"); tagCopy1; length=4 offset=4; inconsistent dLen`,
|
|
`decodedLen=9; tagLiteral (4 bytes "abcd"); tagCopy1; length=4 offset=4; inconsistent dLen`,
|
|
|
"\x09" + "\x0cabcd" + "\x01\x04",
|
|
"\x09" + "\x0cabcd" + "\x01\x04",
|