aboutsummaryrefslogtreecommitdiff
path: root/evil-test-helpers.el
diff options
context:
space:
mode:
authorAxel Forsman <axel@axelf.se>2023-08-06 21:58:29 +0200
committerAxel Forsman <axel@axelf.se>2023-08-07 19:24:35 +0200
commit27d81ad406d2d3e07591b927357d2354ef5b5c65 (patch)
treeff798c83a34b32172cfafdd4af8bcfc21583e692 /evil-test-helpers.el
parent44c7f301468c264a781be4ee8ae879fe1b457e60 (diff)
Avoid eval in evil-test-buffer
Whatever is returned by the macro will be evaluated anyway. This fixes errors due to lexical-binding now being enabled in evil-tests.
Diffstat (limited to 'evil-test-helpers.el')
-rw-r--r--evil-test-helpers.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/evil-test-helpers.el b/evil-test-helpers.el
index 7d67c56..c7eeb71 100644
--- a/evil-test-helpers.el
+++ b/evil-test-helpers.el
@@ -167,17 +167,15 @@ raised. Remaining forms are evaluated as-is.
`(execute-kbd-macro
(apply #'vconcat
(mapcar #'listify-key-sequence
- (mapcar #'eval ',form)))))
+ (list ,@form)))))
((memq (car-safe form) '(kbd vconcat))
`(execute-kbd-macro ,form))
- (t
- form))))
+ (t form))))
(if error-symbol
`(should-error ,result :type ',error-symbol)
result))))
body)))
- (and (buffer-name buffer)
- (kill-buffer buffer))))))
+ (when (buffer-name buffer) (kill-buffer buffer))))))
(defmacro evil-test-selection (string &optional end-string
before-predicate after-predicate)