From a22ba9f739f98cbd20eafdcb7607a25bb03f538b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Aug 2022 14:22:16 +0530 Subject: [PATCH] Fix failing test --- tools/cmd/at/main_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cmd/at/main_test.go b/tools/cmd/at/main_test.go index 38f53380f..767e1654f 100644 --- a/tools/cmd/at/main_test.go +++ b/tools/cmd/at/main_test.go @@ -56,7 +56,7 @@ func TestRCSerialization(t *testing.T) { t.Fatalf("Incorrect serialization: %s != %s", expected, as) } } - simple(`{"cmd":"test","version":[1,2,3]}`) + simple(string(wrap_in_escape_code([]byte(`{"cmd":"test","version":[1,2,3]}`)))) pubkey_b, _, err := crypto.KeyPair("1") if err != nil { t.Fatal(err) @@ -70,6 +70,7 @@ func TestRCSerialization(t *testing.T) { t.Fatal(err) } raw, err := io_data.serializer(&rc) + raw = raw[len("\x1bP@kitty-cmd") : len(raw)-2] var ec utils.EncryptedRemoteControlCmd err = json.Unmarshal([]byte(raw), &ec) if err != nil {