diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-06-14 23:36:49 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-06-14 23:36:49 +0900 |
commit | 022435a90a64a4a20cc09d55c4f0c23435a8c0fe (patch) | |
tree | a7ae11681c20d61e49dc7be214ed55fb99f23d4d /src/options_test.go | |
parent | 6c99cc1700fda0c04500ee03b7e5f3ca22c7710c (diff) |
More alternative notations for execute action
execute(...)
execute[...]
execute~...~
execute!...!
execute@...@
execute#...#
execute$...$
execute%...%
execute^...^
execute&...&
execute*...*
execute:...:
execute;...;
execute/.../
execute|...|
Diffstat (limited to 'src/options_test.go')
-rw-r--r-- | src/options_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/options_test.go b/src/options_test.go index 91e3754b..297acbfd 100644 --- a/src/options_test.go +++ b/src/options_test.go @@ -1,6 +1,7 @@ package fzf import ( + "fmt" "testing" "github.com/junegunn/fzf/src/curses" @@ -167,6 +168,12 @@ func TestBind(t *testing.T) { checkString("echo (,),[,],/,:,;,%,{}", execmap[curses.AltA]) checkString("echo (,),[,],/,:,@,%,{}", execmap[curses.AltB]) + for idx, char := range []rune{'~', '!', '@', '#', '$', '%', '^', '&', '*', '|', ':', ';', '/'} { + keymap, execmap, toggleSort = + parseKeymap(keymap, execmap, false, fmt.Sprintf("%d:execute%cfoobar%c", idx%10, char, char)) + checkString("foobar", execmap[curses.AltZ+int([]rune(fmt.Sprintf("%d", idx%10))[0])]) + } + keymap, execmap, toggleSort = parseKeymap(keymap, execmap, false, "f1:abort") if toggleSort { t.Errorf("toggleSort set") |