diff options
author | aycabta <aycabta@gmail.com> | 2019-06-01 09:05:58 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-06-01 09:06:27 +0900 |
commit | 7df65ef67691fcc354d819da9cd54a1ade9b6247 (patch) | |
tree | a3c9f9a2d22b4f4d790a3399270b01e56069f6d3 /test/reline/test_key_stroke.rb | |
parent | c1e52997870a63168835fde49562cb3c822c968a (diff) |
Use inputrc data for keystroke setting
Diffstat (limited to 'test/reline/test_key_stroke.rb')
-rw-r--r-- | test/reline/test_key_stroke.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/reline/test_key_stroke.rb b/test/reline/test_key_stroke.rb index e76129d04b..224e93d9a0 100644 --- a/test/reline/test_key_stroke.rb +++ b/test/reline/test_key_stroke.rb @@ -14,14 +14,15 @@ class Reline::KeyStroke::Test < Reline::TestCase } def test_match_status - config = { - key_mapping: { - "a" => "xx", - "ab" => "y", - "abc" => "z", - "x" => "rr" - } - } + config = Reline::Config.new + { + "a" => "xx", + "ab" => "y", + "abc" => "z", + "x" => "rr" + }.each_pair do |key, func| + config.add_default_key_binding(key.bytes, func.bytes) + end stroke = Reline::KeyStroke.new(config) assert_equal(:matching, stroke.match_status("a".bytes)) assert_equal(:matching, stroke.match_status("ab".bytes)) |