summaryrefslogtreecommitdiff
path: root/test/test_raw.rb
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-10-08 01:40:05 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-10-09 00:17:00 +0900
commited7becfb4768245f8c76325d86276940df07472e (patch)
tree59359913485255adedd1a494d39b4a166c82ffd6 /test/test_raw.rb
parent9ace1351ffecc88b7b7e459bef54fa95dbcf5ad7 (diff)
downloadfzf-ed7becfb4768245f8c76325d86276940df07472e.tar.gz
Go to the closest match when disabling raw mode
Diffstat (limited to 'test/test_raw.rb')
-rw-r--r--test/test_raw.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/test_raw.rb b/test/test_raw.rb
index eb0df4de..63b62cc7 100644
--- a/test/test_raw.rb
+++ b/test/test_raw.rb
@@ -79,5 +79,27 @@ class TestRaw < TestInteractive
tmux.send_keys :Space
tmux.until { assert_includes it, '[[]] 11' }
+
+ tmux.send_keys 'C-u', '5'
+ tmux.until { assert_includes it, '> 5' }
+
+ tmux.send_keys 'C-x', 'C-p', 'C-p'
+ tmux.until do
+ assert_includes it, '> 25'
+ assert_includes it, '▖ 24'
+ end
+
+ tmux.send_keys 'C-x'
+ tmux.until do
+ assert_includes it, '> 25'
+ assert_includes it, '▌ 15'
+ end
+
+ # 35 is the closest match in raw mode
+ tmux.send_keys 'C-x', :Up, :Up, :Up, :Up, :Up, :Up, 'C-x'
+ tmux.until do
+ assert_includes it, '> 35'
+ assert_includes it, '▌ 25'
+ end
end
end