From bfb166822e998df6c8c15a9b56ae7cfc9d8bfff8 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 10 May 2022 16:46:19 -0400 Subject: [PATCH] fix: update tests for space input --- key_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/key_test.go b/key_test.go index 511ae75b76..b8ce47d748 100644 --- a/key_test.go +++ b/key_test.go @@ -8,8 +8,9 @@ import ( func TestKeyString(t *testing.T) { t.Run("alt+space", func(t *testing.T) { if got := KeyMsg(Key{ - Type: KeySpace, - Alt: true, + Type: KeyRunes, + Runes: []rune{' '}, + Alt: true, }).String(); got != "alt+ " { t.Fatalf(`expected a "alt+ ", got %q`, got) } @@ -35,7 +36,10 @@ func TestKeyString(t *testing.T) { func TestKeyTypeString(t *testing.T) { t.Run("space", func(t *testing.T) { - if got := KeySpace.String(); got != " " { + if got := KeyMsg(Key{ + Type: KeyRunes, + Runes: []rune{' '}, + }).String(); got != " " { t.Fatalf(`expected a " ", got %q`, got) } })