diff options
| author | Vasilij Schneidermann <mail@vasilij.de> | 2018-04-12 23:17:59 +0200 |
|---|---|---|
| committer | Eivind Fonn <evfonn@gmail.com> | 2019-11-20 16:25:41 +0100 |
| commit | ee097ee8bdf75d00453b745a5d013768c7cc5b83 (patch) | |
| tree | 30c170159e304be67ff2e040cbed30dc17e0b2b7 | |
| parent | 93c032a20be694db28bff4dbb65ade2951b6e36a (diff) | |
Fix macro paste/restore testbugfix-1038-handle-vector-macros
| -rw-r--r-- | evil-tests.el | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/evil-tests.el b/evil-tests.el index b7c4f84..d6da77c 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -8135,20 +8135,17 @@ maybe we need one line more with some text\n") "This region is a keepe[r]"))) (ert-deftest evil-test-pasteable-macros () - "Test if we can yank and paste macros containing - <escape>" + "Test if we can paste macros containing unprintables and restore them" :tags '(evil) - (ert-info ("Execute yanked macro") - (evil-test-buffer - "[i]foo\e" - ("\"qd$@q\"qp" - "fooifoo\e"))) - (ert-info ("Paste recorded marco") - (evil-test-buffer - "" - (evil-set-register ?q (vconcat "ifoo" [escape])) - ("@q\"qp") - "fooifoo\e"))) + (ert-info ("Record, paste and restore macro") + (evil-test-buffer + "[f]oobar\n\n" + ([?q ?d right right ?x ?q ?j ?\" ?d ?p]) + (let ((macro [right right ?x]) + (representation (buffer-substring (line-beginning-position) + (line-end-position)))) + (should (equal (edmacro-parse-keys representation) macro)) + (should (equal (edmacro-format-keys macro) representation)))))) (ert-deftest evil-test-forward-symbol () :tags '(evil) |
