From a2aa1a156c29658b62a691f8aa343985043b8c9c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 27 Jan 2025 15:40:21 +0900 Subject: Allow {q} placeholders with range expressions e.g. {q:1}, {q:2..} --- test/test_preview.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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 -- cgit v1.2.3