mirror of
https://github.com/ruby/ruby.git
synced 2025-09-22 20:14:02 +02:00
parent
16f31da92e
commit
5543695a19
7 changed files with 128 additions and 69 deletions
|
@ -241,6 +241,21 @@ class Reline::Config::Test < Reline::TestCase
|
|||
assert_equal expected, @config.key_bindings
|
||||
end
|
||||
|
||||
def test_additional_key_bindings_for_other_keymap
|
||||
@config.read_lines(<<~'LINES'.lines)
|
||||
set keymap vi-command
|
||||
"ab": "AB"
|
||||
set keymap vi-insert
|
||||
"cd": "CD"
|
||||
set keymap emacs
|
||||
"ef": "EF"
|
||||
set editing-mode vi # keymap changes to be vi-insert
|
||||
LINES
|
||||
|
||||
expected = { 'cd'.bytes => 'CD'.bytes }
|
||||
assert_equal expected, @config.key_bindings
|
||||
end
|
||||
|
||||
def test_history_size
|
||||
@config.read_lines(<<~LINES.lines)
|
||||
set history-size 5000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue