diff options
Diffstat (limited to 'test/reline/test_within_pipe.rb')
-rw-r--r-- | test/reline/test_within_pipe.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/reline/test_within_pipe.rb b/test/reline/test_within_pipe.rb index dc58e91e2b..b91f99e1b8 100644 --- a/test/reline/test_within_pipe.rb +++ b/test/reline/test_within_pipe.rb @@ -29,4 +29,15 @@ class Reline::WithinPipeTest < Reline::TestCase @writer.write("abcd\n") assert_equal 'd', Reline.readmultiline(&proc{ true }) end + + def test_macro_commands_for_moving + @config.add_default_key_binding("\C-x\C-a".bytes, :beginning_of_line) + @config.add_default_key_binding("\C-x\C-e".bytes, :end_of_line) + @config.add_default_key_binding("\C-x\C-f".bytes, :forward_char) + @config.add_default_key_binding("\C-x\C-b".bytes, :backward_char) + @config.add_default_key_binding("\C-x\M-f".bytes, :forward_word) + @config.add_default_key_binding("\C-x\M-b".bytes, :backward_word) + @writer.write(" def\C-x\C-aabc\C-x\C-e ghi\C-x\C-a\C-x\C-f\C-x\C-f_\C-x\C-b\C-x\C-b_\C-x\C-f\C-x\C-f\C-x\C-f\C-x\M-f_\C-x\M-b\n") + assert_equal 'a_b_c def_ ghi', Reline.readmultiline(&proc{ true }) + end end |