emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 7a0fb00: Fix test when running from test/lisp/subr-


From: Noam Postavsky
Subject: [Emacs-diffs] master 7a0fb00: Fix test when running from test/lisp/subr-tests.elc
Date: Sat, 15 Jul 2017 21:55:14 -0400 (EDT)

branch: master
commit 7a0fb008193960a7605e32bf0e72e8410e44f575
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Fix test when running from test/lisp/subr-tests.elc
    
    * test/lisp/subr-tests.el (subr-test-backtrace-simple-tests): Don't
    assume a lambda expression will be `equal' to its quoted form.  That's
    not true if the lambda expression has been compiled.
---
 test/lisp/subr-tests.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 54f4ab5..7e50429 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -258,9 +258,9 @@ This exercises `backtrace-frame', and indirectly 
`mapbacktrace'."
     (should (equal (mapbacktrace #'error unbound) nil)))
   ;; First frame is backtrace-related function
   (should (equal (backtrace-frame 0) '(t backtrace-frame 0)))
-  (should (equal (catch 'ret
-                   (mapbacktrace (lambda (&rest args) (throw 'ret args))))
-                 '(t mapbacktrace ((lambda (&rest args) (throw 'ret args))) 
nil)))
+  (let ((throw-args (lambda (&rest args) (throw 'ret args))))
+    (should (equal (catch 'ret (mapbacktrace throw-args))
+                   `(t mapbacktrace (,throw-args) nil))))
   ;; Past-end NFRAMES is silently ignored
   (should (equal (backtrace-frame most-positive-fixnum) nil)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]