summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb77
1 files changed, 76 insertions, 1 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 1042bfcd..89d32628 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -2646,7 +2646,7 @@ class TestGoFZF < TestBase
end
def test_change_preview_window
- tmux.send_keys "seq 1000 | #{FZF} --preview 'echo [[{}]]' --preview-window border-none --bind '" \
+ tmux.send_keys "seq 1000 | #{FZF} --preview 'echo [[{}]]' --no-preview-border --bind '" \
'a:change-preview(echo __{}__),' \
'b:change-preview-window(down)+change-preview(echo =={}==)+change-preview-window(up),' \
'c:change-preview(),d:change-preview-window(hidden),' \
@@ -3449,6 +3449,81 @@ class TestGoFZF < TestBase
BLOCK
tmux.until { assert_block(block, _1) }
end
+
+
+ def test_list_border_and_label
+ tmux.send_keys %(seq 100 | #{FZF} --border rounded --list-border double --list-label list --list-label-pos 2:bottom --header-lines 3 --query 1 --padding 1,2), :Enter
+ block = <<~BLOCK
+ │ ║ 11
+ │ ║ > 10
+ │ ║ 3
+ │ ║ 2
+ │ ║ 1
+ │ ║ 19/97 ─
+ │ ║ > 1
+ │ ╚list══════
+ │
+ ╰──────────────
+ BLOCK
+ tmux.until { assert_block(block, _1) }
+ end
+
+ def test_input_border_and_label
+ tmux.send_keys %(seq 100 | #{FZF} --border rounded --input-border bold --input-label input --input-label-pos 2 --header-lines 3 --query 1 --padding 1,2), :Enter
+ block = <<~BLOCK
+ │ 11
+ │ > 10
+ │ 3
+ │ 2
+ │ 1
+ │ ┏input━━━━━
+ │ ┃ 19/97
+ │ ┃ > 1
+ │ ┗━━━━━━━━━━
+ │
+ ╰──────────────
+ BLOCK
+ tmux.until { assert_block(block, _1) }
+ end
+
+ def test_list_input_border_and_label
+ tmux.send_keys %(
+ seq 100 | #{FZF} --border rounded --list-border double --input-border bold --list-label-pos 2:bottom --input-label-pos 2 --header-lines 3 --query 1 --padding 1,2 \
+ --bind 'start:transform-input-label(echo INPUT)+transform-list-label(echo LIST)' \
+ --bind 'space:change-input-label( input )+change-list-label( list )'
+ ).strip, :Enter
+ block = <<~BLOCK
+ │ ║ 11
+ │ ║ > 10
+ │ ║ 3
+ │ ║ 2
+ │ ║ 1
+ │ ╚LIST═════
+ │ ┏INPUT━━━━
+ │ ┃ 19/97
+ │ ┃ > 1
+ │ ┗━━━━━━━━━
+ │
+ ╰─────────────
+ BLOCK
+ tmux.until { assert_block(block, _1) }
+ tmux.send_keys :Space
+ block = <<~BLOCK
+ │ ║ 11
+ │ ║ > 10
+ │ ║ 3
+ │ ║ 2
+ │ ║ 1
+ │ ╚ list ═══
+ │ ┏ input ━━
+ │ ┃ 19/97
+ │ ┃ > 1
+ │ ┗━━━━━━━━━
+ │
+ ╰─────────────
+ BLOCK
+ tmux.until { assert_block(block, _1) }
+ end
end
module TestShell