m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Print selected items in the order they are selected

This commit is contained in:
Junegunn Choi
2015-01-17 11:07:04 +09:00
parent 0a83705d21
commit 5c0dc79ffa
2 changed files with 48 additions and 9 deletions

View File

@@ -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