mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Two places test for "a character the user typed" by hand, and a third one is about to be needed. Give the test a name. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
17 lines
412 B
Go
17 lines
412 B
Go
package gocui
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestKeyIsPrintable(t *testing.T) {
|
|
assert.True(t, NewKeyRune('x').IsPrintable())
|
|
assert.True(t, NewKeyRune('界').IsPrintable())
|
|
assert.True(t, NewKeyRune(' ').IsPrintable())
|
|
assert.False(t, NewKeyStrMod("x", ModCtrl).IsPrintable())
|
|
assert.False(t, NewKeyName(KeyEnter).IsPrintable())
|
|
assert.False(t, Key{}.IsPrintable())
|
|
}
|