summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-01-17 11:07:04 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-01-17 11:07:04 +0900
commit5c0dc79ffae4c2da24ff77c4aea370287491693d (patch)
tree4587e74be1aab1598cabe8409e32002aeae55163 /test
parent0a83705d210ced8056a5ce503db50ebae2c2d44e (diff)
Print selected items in the order they are selected
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 a499a92f..26d7a04d 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -189,5 +189,18 @@ class TestGoFZF < MiniTest::Unit::TestCase
tmux.until { |lines| lines.last !~ /^>/ }
tmux.close
end
+
+ def test_fzf_multi_order
+ tmux.send_keys "seq 1 10 | fzf --multi > #{tempname}", :Enter
+ tmux.until { |lines| lines.last =~ /^>/ }
+
+ tmux.send_keys :Tab, :Up, :Up, :Tab, :Tab, :Tab, # 3, 2
+ 'C-K', 'C-K', 'C-K', 'C-K', :BTab, :BTab, # 5, 6
+ :PgUp, 'C-J', :Down, :Tab, :Tab # 8, 7
+ tmux.until { |lines| lines[-2].include? '(6)' }
+ tmux.send_keys "C-M"
+ assert_equal %w[3 2 5 6 8 7], File.read(tempname).split($/)
+ tmux.close
+ end
end