mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
change(keys): spacebar sends a KeySpace (#315)
* Revert "fix: update tests for space input" This reverts commitbfb166822e. * Revert "feat: obliterate type KeySpace" This reverts commitd3fb1b707a.
This commit is contained in:
10
key_test.go
10
key_test.go
@@ -8,9 +8,8 @@ import (
|
||||
func TestKeyString(t *testing.T) {
|
||||
t.Run("alt+space", func(t *testing.T) {
|
||||
if got := KeyMsg(Key{
|
||||
Type: KeyRunes,
|
||||
Runes: []rune{' '},
|
||||
Alt: true,
|
||||
Type: KeySpace,
|
||||
Alt: true,
|
||||
}).String(); got != "alt+ " {
|
||||
t.Fatalf(`expected a "alt+ ", got %q`, got)
|
||||
}
|
||||
@@ -36,10 +35,7 @@ func TestKeyString(t *testing.T) {
|
||||
|
||||
func TestKeyTypeString(t *testing.T) {
|
||||
t.Run("space", func(t *testing.T) {
|
||||
if got := KeyMsg(Key{
|
||||
Type: KeyRunes,
|
||||
Runes: []rune{' '},
|
||||
}).String(); got != " " {
|
||||
if got := KeySpace.String(); got != " " {
|
||||
t.Fatalf(`expected a " ", got %q`, got)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user