summaryrefslogtreecommitdiff
path: root/tui/termfo/keys/key_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tui/termfo/keys/key_test.go')
-rw-r--r--tui/termfo/keys/key_test.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/tui/termfo/keys/key_test.go b/tui/termfo/keys/key_test.go
new file mode 100644
index 0000000..2536ddf
--- /dev/null
+++ b/tui/termfo/keys/key_test.go
@@ -0,0 +1,31 @@
+package keys
+
+import (
+ "testing"
+)
+
+func TestKey(t *testing.T) {
+ t.Skip()
+ tests := []struct {
+ k Key
+ want string
+ }{
+ {'a', "<a>"},
+ {'a' | Shift, "<S-a>"},
+ {'a' | Ctrl | Shift, "<S-C-a>"},
+ {'a' | Ctrl | Shift | Alt, "<S-C-A-a>"},
+ {Tab, "<Tab>"},
+ {Tab | Ctrl, "<C-Tab>"},
+ {Up, "<Up>"},
+ {Up | Ctrl, "<C-Up>"},
+ }
+
+ for _, tt := range tests {
+ t.Run("", func(t *testing.T) {
+ h := tt.k.String()
+ if h != tt.want {
+ t.Errorf("\nwant: %s\nhave: %s", tt.want, h)
+ }
+ })
+ }
+}