@ -2493,6 +2493,39 @@ class TestGoFZF < TestBase
end
end
def test_change_preview_window_rotate_hidden
tmux . send_keys " seq 100 | #{ FZF } --preview-window hidden --preview 'echo =={}==' --bind ' " \
" a:change-preview-window(nohidden||down,1|)' " , :Enter
tmux . until { | lines | assert_equal 100 , lines . match_count }
tmux . until { | lines | refute_includes lines [ 1 ] , '==1==' }
tmux . send_keys 'a'
tmux . until { | lines | assert_includes lines [ 1 ] , '==1==' }
tmux . send_keys 'a'
tmux . until { | lines | refute_includes lines [ 1 ] , '==1==' }
tmux . send_keys 'a'
tmux . until { | lines | assert_includes lines [ - 2 ] , '==1==' }
tmux . send_keys 'a'
tmux . until { | lines | refute_includes lines [ - 2 ] , '==1==' }
tmux . send_keys 'a'
tmux . until { | lines | assert_includes lines [ 1 ] , '==1==' }
end
def test_change_preview_window_rotate_hidden_down
tmux . send_keys " seq 100 | #{ FZF } --bind '?:change-preview-window:up||down|' --preview 'echo =={}==' --preview-window hidden,down,1 " , :Enter
tmux . until { | lines | assert_equal 100 , lines . match_count }
tmux . until { | lines | refute_includes lines [ 1 ] , '==1==' }
tmux . send_keys '?'
tmux . until { | lines | assert_includes lines [ 1 ] , '==1==' }
tmux . send_keys '?'
tmux . until { | lines | refute_includes lines [ 1 ] , '==1==' }
tmux . send_keys '?'
tmux . until { | lines | assert_includes lines [ - 2 ] , '==1==' }
tmux . send_keys '?'
tmux . until { | lines | refute_includes lines [ - 2 ] , '==1==' }
tmux . send_keys '?'
tmux . until { | lines | assert_includes lines [ 1 ] , '==1==' }
end
def test_ellipsis
tmux . send_keys 'seq 1000 | tr "\n" , | fzf --ellipsis=SNIPSNIP -e -q500' , :Enter
tmux . until { | lines | assert_equal 1 , lines . match_count }