diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-02-12 22:06:21 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-02-12 22:06:21 +0900 |
commit | 96c3de12eb717e33b175fd01a9aaaac84ea8d6af (patch) | |
tree | 768a95d1e435436a93b5b06db98caf53d1982214 /test | |
parent | 719dbb8bae14a5981b77255bb21ea75907a49d50 (diff) |
Run 'become' only when the command template is properly evaluated
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_go.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index bcc18dc4..6ef2d62c 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -2645,10 +2645,16 @@ class TestGoFZF < TestBase end def test_become - tmux.send_keys "seq 10 | #{FZF} --bind 'enter:become:seq 100 | #{FZF}'", :Enter - tmux.until { |lines| assert_equal 10, lines.item_count } - tmux.send_keys :Enter + tmux.send_keys "seq 100 | #{FZF} --bind 'enter:become:seq {} | #{FZF}'", :Enter tmux.until { |lines| assert_equal 100, lines.item_count } + tmux.send_keys 999 + tmux.until { |lines| assert_equal 0, lines.match_count } + tmux.send_keys :Enter + tmux.until { |lines| assert_equal 0, lines.match_count } + tmux.send_keys :BSpace + tmux.until { |lines| assert_equal 1, lines.match_count } + tmux.send_keys :Enter + tmux.until { |lines| assert_equal 99, lines.item_count } end end |