diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-06-19 01:03:42 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-06-19 01:04:59 +0900 |
| commit | 27258f720723d5de32d483fb6b9ff39608ff9cf9 (patch) | |
| tree | f062088abb10e467e71ae1495c4000533de722ca /test/test_preview.rb | |
| parent | 4d2d6a5ced9ad1ce122c74c2639398a6da9179fc (diff) | |
| download | fzf-27258f720723d5de32d483fb6b9ff39608ff9cf9.tar.gz | |
Add {*} placeholder flag
Diffstat (limited to 'test/test_preview.rb')
| -rw-r--r-- | test/test_preview.rb | 10 |
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 ' } |
