Files
lazygit/pkg/gocui/key_test.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())
}