summaryrefslogtreecommitdiffstats
path: root/src/options_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-04-28 02:36:36 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-04-28 02:36:36 +0900
commit6b592137b966299a8a1324ccb1ddf3d6aaa7bbc9 (patch)
treef93216eee9d31f48816e60269125d66dc74f2313 /src/options_test.go
parentd5e72bf55d0bb317a3b9515885e92d94097b38fe (diff)
Add support for ctrl-alt-[a-z] key chords
Close #906
Diffstat (limited to 'src/options_test.go')
-rw-r--r--src/options_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/options_test.go b/src/options_test.go
index 29d98421..907faf03 100644
--- a/src/options_test.go
+++ b/src/options_test.go
@@ -125,14 +125,14 @@ func TestIrrelevantNth(t *testing.T) {
}
func TestParseKeys(t *testing.T) {
- pairs := parseKeyChords("ctrl-z,alt-z,f2,@,Alt-a,!,ctrl-G,J,g,ALT-enter,alt-SPACE", "")
+ pairs := parseKeyChords("ctrl-z,alt-z,f2,@,Alt-a,!,ctrl-G,J,g,ctrl-alt-a,ALT-enter,alt-SPACE", "")
check := func(i int, s string) {
if pairs[i] != s {
t.Errorf("%s != %s", pairs[i], s)
}
}
- if len(pairs) != 11 {
- t.Error(11)
+ if len(pairs) != 12 {
+ t.Error(12)
}
check(tui.CtrlZ, "ctrl-z")
check(tui.AltZ, "alt-z")
@@ -143,7 +143,8 @@ func TestParseKeys(t *testing.T) {
check(tui.CtrlA+'g'-'a', "ctrl-G")
check(tui.AltZ+'J', "J")
check(tui.AltZ+'g', "g")
- check(tui.AltEnter, "ALT-enter")
+ check(tui.CtrlAltA, "ctrl-alt-a")
+ check(tui.CtrlAltM, "ALT-enter")
check(tui.AltSpace, "alt-SPACE")
// Synonyms