diff options
Diffstat (limited to 'ccl_test.go')
| -rw-r--r-- | ccl_test.go | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/ccl_test.go b/ccl_test.go index 8aaca98..42c71a9 100644 --- a/ccl_test.go +++ b/ccl_test.go @@ -260,6 +260,26 @@ can just span multiple lines"`, msg: `string: '\033'`, want: message{String: "\033"}, }, { + desc: "StringOctalOne", + msg: `string:'\0asdf'`, + want: message{String: "\x00asdf"}, + }, { + desc: "StringOctalTwo", + msg: `string:'\33['`, + want: message{String: "\033["}, + }, { + desc: "StringOctalFour", + msg: `string:'\1234'`, + want: message{String: "\1234"}, + }, { + desc: "StringHexOne", + msg: `string:'\xfhello'`, + want: message{String: "\x0fhello"}, + }, { + desc: "StringHexThree", + msg: `string:'\x0ff'`, + want: message{String: "\x0ff"}, + }, { desc: "StringStripCarriageReturn", msg: "string:'a\r\nb'", want: message{String: "a\nb"}, @@ -404,9 +424,6 @@ func TestUnmarshal_Invalid(t *testing.T) { desc: "StringBadReturnEscape", msg: "string:'\\\r'", }, { - desc: "StringShortHex", - msg: `string:"\x1"`, - }, { desc: "StringBadHex", msg: `string:"\xgg"`, }, { |
