From 391669a451c4eedd74dd6e1794601d2ca793340c Mon Sep 17 00:00:00 2001 From: Simon Fraser Date: Sun, 27 Oct 2019 14:50:12 +0000 Subject: Add 'f' flag for placeholder expression (#1733) If present the contents of the selection will be placed in a temporary file, and the filename will be placed into the string instead. --- test/test_go.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/test_go.rb b/test/test_go.rb index 4d3fa647..724d847c 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1417,6 +1417,15 @@ class TestGoFZF < TestBase tmux.until { |lines| lines[1].include?('{//1 10/1 10 /123//0 9}') } end + def test_preview_file + tmux.send_keys %[(echo foo bar; echo bar foo) | #{FZF} --multi --preview 'cat {+f} {+f2} {+nf} {+fn}' --print0], :Enter + tmux.until { |lines| lines[1].include?('foo barbar00') } + tmux.send_keys :BTab + tmux.until { |lines| lines[1].include?('foo barbar00') } + tmux.send_keys :BTab + tmux.until { |lines| lines[1].include?('foo barbar foobarfoo0101') } + end + def test_preview_q_no_match tmux.send_keys %(: | #{FZF} --preview 'echo foo {q}'), :Enter tmux.until { |lines| lines.match_count == 0 } -- cgit v1.2.3