diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-02-01 23:14:21 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-02-01 23:14:21 +0900 |
commit | c862af09f29c6ea0a6b60e480aa0b6e6f760d2de (patch) | |
tree | 66c2575f9a6ea31612f8e379b5e689aedf777160 /test | |
parent | 1cfeec0ca3fc254e770776765c9e912dc4ab301a (diff) |
Fix toggle-preview-wrap action
Fix #2336
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_go.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 142b2d1a..8f805895 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1864,6 +1864,19 @@ class TestGoFZF < TestBase tmux.send_keys "#{FZF} --preview 'seq 1000 | nl' --preview-window down:noborder:follow", :Enter tmux.until { |lines| assert_equal '1000 1000', lines[-1].strip } end + + def test_toggle_preview_wrap + tmux.send_keys "#{FZF} --preview 'for i in $(seq $FZF_PREVIEW_COLUMNS); do echo -n .; done; echo wrapped; echo 2nd line' --bind ctrl-w:toggle-preview-wrap", :Enter + 2.times do + tmux.until { |lines| assert_includes lines[2], '2nd line' } + tmux.send_keys 'C-w' + tmux.until do |lines| + assert_includes lines[2], 'wrapped' + assert_includes lines[3], '2nd line' + end + tmux.send_keys 'C-w' + end + end end module TestShell |