summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-06-19 01:03:42 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-06-19 01:04:59 +0900
commit27258f720723d5de32d483fb6b9ff39608ff9cf9 (patch)
treef062088abb10e467e71ae1495c4000533de722ca /test
parent4d2d6a5ced9ad1ce122c74c2639398a6da9179fc (diff)
downloadfzf-27258f720723d5de32d483fb6b9ff39608ff9cf9.tar.gz
Add {*} placeholder flag
Diffstat (limited to 'test')
-rw-r--r--test/test_preview.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_preview.rb b/test/test_preview.rb
index 576e36ec..e2147735 100644
--- a/test/test_preview.rb
+++ b/test/test_preview.rb
@@ -189,6 +189,16 @@ class TestPreview < TestInteractive
tmux.until { |lines| assert_includes lines[1], ' {//1 10/1 10 /123//0 9} ' }
end
+ def test_preview_asterisk
+ tmux.send_keys %(seq 5 | #{FZF} --multi --preview 'echo {} / {+} / {*}'), :Enter
+ tmux.until { |lines| assert_equal 5, lines.match_count }
+ tmux.until { |lines| assert_includes lines[1], ' 1 / 1 / 1 2 3 4 5 ' }
+ tmux.send_keys :BTab
+ tmux.until { |lines| assert_includes lines[1], ' 2 / 1 / 1 2 3 4 5 ' }
+ tmux.send_keys :BTab
+ tmux.until { |lines| assert_includes lines[1], ' 3 / 1 2 / 1 2 3 4 5 ' }
+ 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| assert_includes lines[1], ' foo barbar00 ' }