summaryrefslogtreecommitdiff
path: root/test/lisp/electric-tests.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2021-01-30 23:37:19 +0900
committerYuuki Harano <masm+github@masm11.me>2021-01-30 23:37:19 +0900
commit50c76b844bc79309b4f5d9e28a2386b9a6f735b7 (patch)
tree29f8273d8afccae1f16b723c36548cee150cb0bc /test/lisp/electric-tests.el
parent563a0d94c379292bd88e83f18560ed21c497cea9 (diff)
parent96f20120c97a0a329fff81a0cc3747082a8a2c55 (diff)
downloademacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.tar.gz
emacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.tar.bz2
emacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'test/lisp/electric-tests.el')
-rw-r--r--test/lisp/electric-tests.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el
index 1b7beeaa366..62a42b7fe44 100644
--- a/test/lisp/electric-tests.el
+++ b/test/lisp/electric-tests.el
@@ -1,4 +1,4 @@
-;;; electric-tests.el --- tests for electric.el
+;;; electric-tests.el --- tests for electric.el -*- lexical-binding: t; -*-
;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
@@ -135,9 +135,11 @@ The buffer's contents should %s:
(length fixture)
fixture
(if fixture-fn (format "\nNow call this:\n\n%s"
- (pp-to-string fixture-fn)) "")
+ (pp-to-string fixture-fn))
+ "")
(if bindings (format "\nEnsure the following bindings:\n\n%s"
- (pp-to-string bindings)) "")
+ (pp-to-string bindings))
+ "")
char
(if (string= fixture expected-string) "stay" "become")
(replace-regexp-in-string "\n" "\\\\n" expected-string)
@@ -163,8 +165,11 @@ The buffer's contents should %s:
(test-in-comments t)
(test-in-strings t)
(test-in-code t)
- (fixture-fn #'(lambda ()
- (electric-pair-mode 1))))
+ ;; The semantics of CL's defmacro "default values" is subtle:
+ ;; contrary to the actual arguments, these are evaluated (and
+ ;; are expected to return the "default form").
+ ;; `fixture-fn' contains a form whose evaluation returns a function.
+ (fixture-fn '#'electric-pair-mode))
`(progn
,@(cl-loop
for mode in (eval modes) ;FIXME: avoid `eval'