1
0
Fork 0
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:
aycabta 2019-07-04 19:29:07 +09:00
parent 265b9a0edf
commit 6fa7ed453e

View file

@ -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