diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-27 15:43:31 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-27 15:51:04 +0900 |
commit | 4c70745cc1c8856486dab9e07985cbcf5081e490 (patch) | |
tree | 84a742cb75d32c13142a9354e4aa40858abc0f07 /test | |
parent | 7795748a3f42e86a802cc9ea9569429892f47f95 (diff) |
Fix bug where preview is not updated after reload when --disabled is set
Fix #3311
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_go.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 469d007e..5ac0eee0 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -2935,6 +2935,14 @@ class TestGoFZF < TestBase tmux.send_keys "sleep 0.5 | #{FZF} --bind 'start:reload:ls' --bind 'load:become:tty'", :Enter tmux.until { |lines| assert_includes lines, '/dev/tty' } end + + def test_disabled_preview_update + tmux.send_keys "echo bar | #{FZF} --disabled --bind 'change:reload:echo foo' --preview 'echo [{q}-{}]'", :Enter + tmux.until { |lines| assert_equal 1, lines.match_count } + tmux.until { |lines| assert(lines.any? { |line| line.include?('[-bar]') }) } + tmux.send_keys :x + tmux.until { |lines| assert(lines.any? { |line| line.include?('[x-foo]') }) } + end end module TestShell |