diff options
Diffstat (limited to 'test/lisp/emacs-lisp/cl-macs-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/cl-macs-tests.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el b/test/lisp/emacs-lisp/cl-macs-tests.el index 5c3e603b92e..f4e2e46a019 100644 --- a/test/lisp/emacs-lisp/cl-macs-tests.el +++ b/test/lisp/emacs-lisp/cl-macs-tests.el @@ -630,12 +630,13 @@ collection clause." (and xs (progn (setq n1 (1+ n)) (len2 (cdr xs) n1)))))) - ;; Tail call in error handler. + ;; Tail calls in error and success handlers. (len3 (xs n) (if xs - (condition-case nil - (/ 1 0) - (arith-error (len3 (cdr xs) (1+ n)))) + (condition-case k + (/ 1 (logand n 1)) + (arith-error (len3 (cdr xs) (1+ n))) + (:success (len3 (cdr xs) (+ n k)))) n))) (should (equal (len nil 0) 0)) (should (equal (len2 nil 0) 0)) |