From: Artur Malabarba Date: Fri, 6 Nov 2015 11:18:23 +0000 (+0000) Subject: * test/automated/subr-tests.el (subr-test-when): Fix test X-Git-Tag: emacs-25.0.90~906 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9b912623ad9032267106b134dd04e620c2b6c0a1;p=emacs.git * test/automated/subr-tests.el (subr-test-when): Fix test --- diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el index 85d5d112d9e..e782f7b1ee1 100644 --- a/test/automated/subr-tests.el +++ b/test/automated/subr-tests.el @@ -91,8 +91,15 @@ (should (equal (when t 'x 2) 2)) (should (equal (when nil 'x 1) nil)) (should (equal (when nil 'x 2) nil)) - (should (equal (macroexpand-all '(when a b)) - '(if a b))) + (let ((x 1)) + (should-not (when nil + (setq x (1+ x)) + x)) + (should (= x 1)) + (should (= 2 (when true + (setq x (1+ x)) + x))) + (should (= x 2))) (should (equal (macroexpand-all '(when a b c d)) '(if a (progn b c d)))))