summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-09-29 22:36:44 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-10-09 00:17:00 +0900
commit8f0c91545d308e534284b19edf61cbdb1ebbb315 (patch)
treee670530b324b8d9bfdde7ba5dc2c625cfbed8261 /test
parent0eefcf348e7e56c6ee0f888384d63281e6678a7d (diff)
downloadfzf-8f0c91545d308e534284b19edf61cbdb1ebbb315.tar.gz
Add $FZF_RAW for conditional actions
Diffstat (limited to 'test')
-rw-r--r--test/test_raw.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/test_raw.rb b/test/test_raw.rb
index 139b1950..eb0df4de 100644
--- a/test/test_raw.rb
+++ b/test/test_raw.rb
@@ -5,7 +5,7 @@ require_relative 'lib/common'
# Testing raw mode
class TestRaw < TestInteractive
def test_raw_mode
- tmux.send_keys %(seq 1000 | #{FZF} --raw --bind ctrl-x:toggle-raw,a:enable-raw,b:disable-raw --gutter '▌' --multi), :Enter
+ tmux.send_keys %(seq 1000 | #{FZF} --raw --bind ctrl-x:toggle-raw,a:enable-raw,b:disable-raw --gutter '▌' --multi --bind 'space:transform-prompt:echo "[[$FZF_RAW]] "'), :Enter
tmux.until { assert_equal 1000, it.match_count }
tmux.send_keys 1
@@ -64,11 +64,20 @@ class TestRaw < TestInteractive
assert_includes it, '▖ 10'
end
+ tmux.send_keys :Down, :Space
+ tmux.until { assert_includes it, '[[0]] 11' }
+
+ tmux.send_keys :Up, :Space
+ tmux.until { assert_includes it, '[[1]] 11' }
+
tmux.send_keys 'b'
tmux.until do
assert_equal 1, it.select_count
assert_includes it, '▌ 110'
assert_includes it, '>>11'
end
+
+ tmux.send_keys :Space
+ tmux.until { assert_includes it, '[[]] 11' }
end
end