Skip to content
Myr

fix: update tests for space input

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent d3fb1b7 · Browse files · 1 file+7 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−3 removed

  • other:+7 added−3 removed

1 file+7 added−3 removed

modified:key_test.go+7 added-3 removed
6 unmodified lines
78func TestKeyString(t *testing.T) {9 t.Run("alt+space", func(t *testing.T) {10 if got := KeyMsg(Key{11 Type: KeySpace,12 Alt: true,11 Type: KeyRunes,12 Runes: []rune{' '},13 Alt: true,14 }).String(); got != "alt+ " {15 t.Fatalf(`expected a "alt+ ", got %q`, got)16 }17 })
17 unmodified lines
35}3637func TestKeyTypeString(t *testing.T) {38 t.Run("space", func(t *testing.T) {38 if got := KeySpace.String(); got != " " {39 if got := KeyMsg(Key{40 Type: KeyRunes,41 Runes: []rune{' '},42 }).String(); got != " " {43 t.Fatalf(`expected a " ", got %q`, got)44 }45 })46
35 unmodified lines