summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/subr-x-tests.el
diff options
context:
space:
mode:
authorRasmus <rasmus@gmx.us>2017-09-29 10:41:51 +0200
committerRasmus <rasmus@gmx.us>2017-09-29 10:41:51 +0200
commitd4b2bbdc73ace5cb0971a32a75941486489d1cc5 (patch)
treedc92eb83d4a66f112e3688ad10632e14ca6601ff /test/lisp/emacs-lisp/subr-x-tests.el
parenteaefbc26d5c6cffbe4a22d3a9f4c7e6209a7b5a7 (diff)
parentaf130f900fc499f71ea22f10ba055a75ce35ed4e (diff)
downloademacs-d4b2bbdc73ace5cb0971a32a75941486489d1cc5.tar.gz
emacs-d4b2bbdc73ace5cb0971a32a75941486489d1cc5.tar.bz2
emacs-d4b2bbdc73ace5cb0971a32a75941486489d1cc5.zip
Merge branch 'emacs-26' into scratch/org-mode-merge
Diffstat (limited to 'test/lisp/emacs-lisp/subr-x-tests.el')
-rw-r--r--test/lisp/emacs-lisp/subr-x-tests.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el
index 2c6740a96cf..0e8871d9a9c 100644
--- a/test/lisp/emacs-lisp/subr-x-tests.el
+++ b/test/lisp/emacs-lisp/subr-x-tests.el
@@ -397,9 +397,14 @@
(should (equal 1 (let ((x 1)) (and-let* (x)))))
(should (equal nil (and-let* ((x nil)))))
(should (equal 1 (and-let* ((x 1)))))
- (should-error (and-let* (nil (x 1))) :type 'setting-constant)
+ ;; The error doesn't trigger when compiled: the compiler will give
+ ;; a warning and then drop the erroneous code. Therefore, use
+ ;; `eval' to avoid compilation.
+ (should-error (eval '(and-let* (nil (x 1))) lexical-binding)
+ :type 'setting-constant)
(should (equal nil (and-let* ((nil) (x 1)))))
- (should-error (and-let* (2 (x 1))) :type 'wrong-type-argument)
+ (should-error (eval (and-let* (2 (x 1))) lexical-binding)
+ :type 'wrong-type-argument)
(should (equal 1 (and-let* ((2) (x 1)))))
(should (equal 2 (and-let* ((x 1) (2)))))
(should (equal nil (let ((x nil)) (and-let* (x) x))))