From ee097ee8bdf75d00453b745a5d013768c7cc5b83 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Thu, 12 Apr 2018 23:17:59 +0200 Subject: Fix macro paste/restore test --- evil-tests.el | 23 ++++++++++------------- 1 file 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 - " + "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) -- cgit v1.0