emacs-diffs
[Top][All Lists]
Advanced

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

master f4452bb: Fix structure of condition object in nested 'ert-fail'.


From: Philipp Stephani
Subject: master f4452bb: Fix structure of condition object in nested 'ert-fail'.
Date: Mon, 8 Mar 2021 08:32:20 -0500 (EST)

branch: master
commit f4452bb8140cb7485be0a529afc91476becb5d91
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Fix structure of condition object in nested 'ert-fail'.
    
    See the test 'ert-test-fail' for the expected structure.
    
    * lisp/emacs-lisp/ert.el (ert--should-signal-hook): Condition list
    should be (SYMBOL . DATA), not (SYMBOL DATA).
    * test/lisp/emacs-lisp/ert-tests.el (ert-test-fail-inside-should): Fix
    unit test.
---
 lisp/emacs-lisp/ert.el            | 2 +-
 test/lisp/emacs-lisp/ert-tests.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 155b6a9..d22b239 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -261,7 +261,7 @@ DATA is displayed to the user and should state the reason 
for skipping."
 It should only be stopped when ran from inside ert--run-test-internal."
   (when (and (not (symbolp debugger))   ; only run on anonymous debugger
              (memq error-symbol '(ert-test-failed ert-test-skipped)))
-    (funcall debugger 'error (list error-symbol data))))
+    (funcall debugger 'error (cons error-symbol data))))
 
 (defun ert--special-operator-p (thing)
   "Return non-nil if THING is a symbol naming a special operator."
diff --git a/test/lisp/emacs-lisp/ert-tests.el 
b/test/lisp/emacs-lisp/ert-tests.el
index bdacb08..5c96961 100644
--- a/test/lisp/emacs-lisp/ert-tests.el
+++ b/test/lisp/emacs-lisp/ert-tests.el
@@ -814,7 +814,7 @@ This macro is used to test if macroexpansion in `should' 
works."
                   :body (lambda () (should (integerp (ert-fail "Boo"))))))))
     (should (ert-test-failed-p result))
     (should (equal (ert-test-failed-condition result)
-                   '(ert-test-failed ("Boo"))))))
+                   '(ert-test-failed "Boo")))))
 
 
 (provide 'ert-tests)



reply via email to

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