summaryrefslogtreecommitdiff
path: root/tui/termfo/keys/key_test.go
blob: 2536ddfaef929e0535264ef32c3ad799c9399677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)
			}
		})
	}
}