summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2018-12-05 18:45:55 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2018-12-05 18:45:55 +0900
commit61feee690c25487aab7613771cd75166d404273a (patch)
tree954aa7e2e416d6903f1f3b98376c8a722b14b6ad /test
parentd4ed955aee08a1c2ceb64e562ab4a88bdc9af8f0 (diff)
Render preview window when the initial query fails to match
Only if preview template contains {q} Fix #1452 Related #1307
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index c7758068..d22b8939 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -1427,6 +1427,12 @@ class TestGoFZF < TestBase
tmux.until { |lines| !lines[1].include?('foo') }
end
+ def test_preview_q_no_match_with_initial_query
+ tmux.send_keys %(: | #{FZF} --preview 'echo foo {q}{q}' --query foo), :Enter
+ tmux.until { |lines| lines.match_count == 0 }
+ tmux.until { |lines| lines[1].include?('foofoo') }
+ end
+
def test_no_clear
tmux.send_keys "seq 10 | fzf --no-clear --inline-info --height 5 > #{tempname}", :Enter
prompt = '> < 10/10'