From 5b6196ebe67cf954bae8212c1a33b869da723e11 Mon Sep 17 00:00:00 2001 From: raven Date: Fri, 20 Feb 2026 13:42:12 -0600 Subject: support builtin terminfo copy termfo into the repository and modify it to embed an xterm terminfo to as a fallback --- tui/termfo/keys/key_test.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tui/termfo/keys/key_test.go (limited to 'tui/termfo/keys/key_test.go') 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' | Shift, ""}, + {'a' | Ctrl | Shift, ""}, + {'a' | Ctrl | Shift | Alt, ""}, + {Tab, ""}, + {Tab | Ctrl, ""}, + {Up, ""}, + {Up | Ctrl, ""}, + } + + 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) + } + }) + } +} -- cgit v1.2.3