mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-28 02:24:49 -05:00
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())
|
|
}
|