Skip to content

Commit

Permalink
fix: update tests for space input
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed May 10, 2022
1 parent d3fb1b7 commit bfb1668
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions key_test.go
Expand Up @@ -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)
}
Expand All @@ -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)
}
})
Expand Down

0 comments on commit bfb1668

Please sign in to comment.