summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJonathan Slenders <jonathan@slenders.be>2016-12-17 18:52:55 +0100
committerJonathan Slenders <jonathan@slenders.be>2016-12-17 18:52:55 +0100
commitd743858ea49e42bb9475a626ac3a597291f28c18 (patch)
tree615861378e64bb145e3a5bc39e3be00ed98f27d6 /tests
parent2f9b04e1750fc94d07df511e637e77b069a85753 (diff)
Implemented keyboard macros. (Like readline in Emacs mode.)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cli.py16
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):