aboutsummaryrefslogtreecommitdiffstats
path: root/config/binds_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/binds_test.go')
-rw-r--r--config/binds_test.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/config/binds_test.go b/config/binds_test.go
index a92cf22f..7d4cd779 100644
--- a/config/binds_test.go
+++ b/config/binds_test.go
@@ -13,7 +13,10 @@ func TestGetBinding(t *testing.T) {
bindings := NewKeyBindings()
add := func(binding, cmd string) {
- b, _ := ParseBinding(binding, cmd, "")
+ b, err := ParseBinding(binding, cmd, "")
+ if err != nil {
+ t.Fatal(err)
+ }
bindings.Add(b)
}
@@ -58,6 +61,8 @@ func TestGetBinding(t *testing.T) {
add("<C-Down>", ":next")
add("<C-PgUp>", ":prev")
add("<C-Enter>", ":open")
+ add("<C-->", ":open")
+ add("<S-up>", ":open")
test([]KeyStroke{
{vaxis.ModCtrl, 'a'},
}, BINDING_FOUND, "c-a")
@@ -73,4 +78,10 @@ func TestGetBinding(t *testing.T) {
test([]KeyStroke{
{vaxis.ModCtrl, vaxis.KeyEnter},
}, BINDING_FOUND, ":open")
+ test([]KeyStroke{
+ {vaxis.ModCtrl, '-'},
+ }, BINDING_FOUND, ":open")
+ test([]KeyStroke{
+ {vaxis.ModShift, vaxis.KeyUp},
+ }, BINDING_FOUND, ":open")
}