mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Check commented out line in inputrc correctly
This commit is contained in:
parent
265b9a0edf
commit
6fa7ed453e
1 changed files with 22 additions and 0 deletions
|
@ -163,4 +163,26 @@ class Reline::Config::Test < Reline::TestCase
|
|||
expected = { 'abcd'.bytes => 'ABCD'.bytes, 'ijkl'.bytes => 'IJKL'.bytes }
|
||||
assert_equal expected, @config.key_bindings
|
||||
end
|
||||
|
||||
def test_additional_key_bindings
|
||||
@config.read_lines(<<~'LINES'.lines)
|
||||
"ef": "EF"
|
||||
"gh": "GH"
|
||||
LINES
|
||||
|
||||
expected = { 'ef'.bytes => 'EF'.bytes, 'gh'.bytes => 'GH'.bytes }
|
||||
assert_equal expected, @config.key_bindings
|
||||
end
|
||||
|
||||
def test_additional_key_bindings_with_nesting_and_comment_out
|
||||
@config.read_lines(<<~'LINES'.lines)
|
||||
#"ab": "AB"
|
||||
#"cd": "cd"
|
||||
"ef": "EF"
|
||||
"gh": "GH"
|
||||
LINES
|
||||
|
||||
expected = { 'ef'.bytes => 'EF'.bytes, 'gh'.bytes => 'GH'.bytes }
|
||||
assert_equal expected, @config.key_bindings
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue