summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-28 18:34:12 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-28 18:34:12 +0900
commiteb0257d48f8362ff91df162ac4bc07ac0693ba27 (patch)
tree3ca94beb69273ea7b08cc52388824cc528c81d18 /test
parentb83dd6c6b426da99e11a8b3c58c075c70ee2700a (diff)
downloadfzf-eb0257d48f8362ff91df162ac4bc07ac0693ba27.tar.gz
Enhance --min-height option to take number followed by +
Diffstat (limited to 'test')
-rw-r--r--test/test_layout.rb31
1 files changed, 31 insertions, 0 deletions
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