summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-07-20 10:52:29 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-07-20 10:53:58 +0900
commitead302981cc9d9219e58c1517921e9f2d68a6b6e (patch)
tree0e4a8574ef775582c69266cb9261b969f4906e90 /test
parentfe0ffa14ffb1d4b1c441889d4736fe1063bf65ca (diff)
downloadfzf-ead302981cc9d9219e58c1517921e9f2d68a6b6e.tar.gz
Add support for {*n} and {*nf} placeholder
Close #4458
Diffstat (limited to 'test')
-rw-r--r--test/test_preview.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_preview.rb b/test/test_preview.rb
index fa05fbcb..d14d9f68 100644
--- a/test/test_preview.rb
+++ b/test/test_preview.rb
@@ -190,17 +190,17 @@ class TestPreview < TestInteractive
end
def test_preview_asterisk
- tmux.send_keys %(seq 5 | #{FZF} --multi --preview 'echo [{} / {+} / {*}]' --preview-window '+{1}'), :Enter
+ tmux.send_keys %(seq 5 | #{FZF} --multi --preview 'echo [{}/{+}/{*}/{*n}]' --preview-window '+{1}'), :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.until { |lines| assert_includes lines[1], ' [1/1/1 2 3 4 5/0 1 2 3 4] ' }
tmux.send_keys :BTab
- tmux.until { |lines| assert_includes lines[1], ' [2 / 1 / 1 2 3 4 5] ' }
+ tmux.until { |lines| assert_includes lines[1], ' [2/1/1 2 3 4 5/0 1 2 3 4] ' }
tmux.send_keys :BTab
- tmux.until { |lines| assert_includes lines[1], ' [3 / 1 2 / 1 2 3 4 5] ' }
+ tmux.until { |lines| assert_includes lines[1], ' [3/1 2/1 2 3 4 5/0 1 2 3 4] ' }
tmux.send_keys '5'
- tmux.until { |lines| assert_includes lines[1], ' [5 / 1 2 / 5] ' }
+ tmux.until { |lines| assert_includes lines[1], ' [5/1 2/5/4] ' }
tmux.send_keys '5'
- tmux.until { |lines| assert_includes lines[1], ' [ / 1 2 / ] ' }
+ tmux.until { |lines| assert_includes lines[1], ' [/1 2//] ' }
end
def test_preview_file