From eb0257d48f8362ff91df162ac4bc07ac0693ba27 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 28 Jan 2025 18:34:12 +0900 Subject: Enhance --min-height option to take number followed by + --- test/test_layout.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'test/test_layout.rb') diff --git a/test/test_layout.rb b/test/test_layout.rb index 5bf441d2..dcfe1d78 100644 --- a/test/test_layout.rb +++ b/test/test_layout.rb @@ -845,4 +845,35 @@ class TestLayout < TestInteractive assert lines[1]&.end_with?('1000││') end end + + def test_min_height_no_auto + tmux.send_keys %(seq 100 | #{FZF} --border sharp --style full:sharp --height 1% --min-height 5), :Enter + + block = <<~BLOCK + ┌─────── + │ ┌───── + │ │ > + │ └───── + └─────── + BLOCK + tmux.until { assert_block(block, _1) } + end + + def test_min_height_auto + tmux.send_keys %(seq 100 | #{FZF} --style full:sharp --height 1% --min-height 5+), :Enter + + block = <<~BLOCK + ┌───────── + │ 5 + │ 4 + │ 3 + │ 2 + │ > 1 + └───────── + ┌───────── + │ > + └───────── + BLOCK + tmux.until { assert_block(block, _1) } + end end -- cgit v1.2.3