From da9179335c637d91ab49256dd3c3e7dcdf319e19 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 8 Dec 2024 20:03:15 +0900 Subject: Respect the properties of the currently active preview window options --- test/test_go.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/test_go.rb b/test/test_go.rb index 433fdef3..e343b967 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -3073,6 +3073,14 @@ class TestGoFZF < TestBase tmux.until { |lines| assert_includes lines, '/1/1/' } end + def test_alternative_preview_window_opts + tmux.send_keys "seq 10 | #{FZF} --preview-window '~5,2,+0,<100000(~0,+100,wrap,noinfo)' --preview 'seq 1000'", :Enter + tmux.until { |lines| assert_equal 10, lines.item_count } + tmux.until do |lines| + assert_equal ['╭────╮', '│ 10 │', '│ 0 │', '│ 10 │', '│ 1 │'], lines.take(5).map(&:strip) + end + end + def test_become tmux.send_keys "seq 100 | #{FZF} --bind 'enter:become:seq {} | #{FZF}'", :Enter tmux.until { |lines| assert_equal 100, lines.item_count } -- cgit v1.2.3