summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-03-31 22:05:02 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-03-31 22:05:16 +0900
commit50292adacbad70f9561bc1e22ccbd3adea22481a (patch)
tree72a9ba657933585b7c56798b71b64a206144421b /test
parent84a7499ae357bc3b3a82890d2e44d9c300af0c13 (diff)
Implement --toggle-sort option (#173)
Diffstat (limited to 'test')
-rw-r--r--test/test_go.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index a47e422e..ebedbff2 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -457,6 +457,19 @@ class TestGoFZF < TestBase
tmux.send_keys "seq 1 100 | #{fzf '-q55 -1 --expect=alt-z --print-query'}", :Enter
assert_equal ['55', '', '55'], readonce.split($/)
end
+
+ def test_toggle_sort
+ tmux.send_keys "seq 1 111 | #{fzf '-m +s --tac --toggle-sort=ctrl-r -q11'}", :Enter
+ tmux.until { |lines| lines[-3].include? '> 111' }
+ tmux.send_keys :Tab
+ tmux.until { |lines| lines[-2].include? '4/111 (1)' }
+ tmux.send_keys 'C-R'
+ tmux.until { |lines| lines[-3].include? '> 11' }
+ tmux.send_keys :Tab
+ tmux.until { |lines| lines[-2].include? '4/111 (2)' }
+ tmux.send_keys :Enter
+ assert_equal ['111', '11'], readonce.split($/)
+ end
end
module TestShell