summaryrefslogtreecommitdiff
path: root/test/test_preview.rb
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-27 15:40:21 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-27 18:04:57 +0900
commita2aa1a156c29658b62a691f8aa343985043b8c9c (patch)
tree291473b3e429657d064227b9ee5af991e12102fa /test/test_preview.rb
parent2f8a72a42a7503276a99cc0234f98f8c56169320 (diff)
downloadfzf-a2aa1a156c29658b62a691f8aa343985043b8c9c.tar.gz
Allow {q} placeholders with range expressions
e.g. {q:1}, {q:2..}
Diffstat (limited to 'test/test_preview.rb')
-rw-r--r--test/test_preview.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_preview.rb b/test/test_preview.rb
index c3659af0..b92ac8c3 100644
--- a/test/test_preview.rb
+++ b/test/test_preview.rb
@@ -209,9 +209,9 @@ class TestPreview < TestInteractive
end
def test_preview_q_no_match_with_initial_query
- tmux.send_keys %(: | #{FZF} --preview 'echo foo {q}{q}' --query foo), :Enter
+ tmux.send_keys %(: | #{FZF} --preview 'echo foo {q}/{q}/{q:1}/{q:..}/{q:2}/{q:-1}/{q:-2}/{q:x}' --query 'foo bar'), :Enter
tmux.until { |lines| assert_equal 0, lines.match_count }
- tmux.until { |lines| assert_includes lines[1], ' foofoo ' }
+ tmux.until { |lines| assert_includes lines[1], ' foo bar/foo bar/foo/foo bar/bar/bar/foo/{q:x} ' }
end
def test_preview_update_on_select