summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-05-01 13:53:34 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-05-01 13:53:34 +0900
commitb7c2e8cb678d12c73c497fdec5c0cad8f32a6814 (patch)
treeb83f4c096ed8b12dc1b36fe7eb9baf78bdc4325d /test
parentfb76893e18fd567ac45a516f708832ae0f2ad37c (diff)
Fix caching when reload and query change triggered by the same binding
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index ff459e1c..1c5c3de4 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -2866,6 +2866,24 @@ class TestGoFZF < TestBase
tmux.send_keys "(echo foo; echo bar) | #{FZF} --bind 'load:reload-sync(sleep 60)+change-query(bar)'", :Enter
tmux.until { |lines| assert_equal 1, lines.match_count }
end
+
+ def test_reload_and_change_cache
+ tmux.send_keys "echo bar | #{FZF} --bind 'zero:change-header(foo)+reload(echo foo)+clear-query'", :Enter
+ expected = <<~OUTPUT
+ > bar
+ 1/1
+ >
+ OUTPUT
+ tmux.until { assert_block(expected, _1) }
+ tmux.send_keys :z
+ expected = <<~OUTPUT
+ > foo
+ foo
+ 1/1
+ >
+ OUTPUT
+ tmux.until { assert_block(expected, _1) }
+ end
end
module TestShell