diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2016-12-17 18:52:55 +0100 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2016-12-17 18:52:55 +0100 |
commit | d743858ea49e42bb9475a626ac3a597291f28c18 (patch) | |
tree | 615861378e64bb145e3a5bc39e3be00ed98f27d6 /tests | |
parent | 2f9b04e1750fc94d07df511e637e77b069a85753 (diff) |
Implemented keyboard macros. (Like readline in Emacs mode.)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cli.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py index ecab145d..68ca3d03 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -428,6 +428,22 @@ def test_emacs_insert_comment(): assert result.text == '#hello\n#world' +def test_emacs_record_macro(): + operations = ( + ' ' + '\x18(' # Start recording macro. C-X( + 'hello' + '\x18)' # Stop recording macro. + ' ' + '\x18e' # Execute macro. + '\x18e' # Execute macro. + '\n' + ) + + result, cli = _feed_cli_with_input(operations) + assert result.text == ' hello hellohello' + + def test_prefix_meta(): # Test the prefix-meta command. def setup_keybindings(cli): |