emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat ef5246cf55 38/84: Fix issues related to 'expect'


From: ELPA Syncer
Subject: [elpa] externals/compat ef5246cf55 38/84: Fix issues related to 'expect' tests
Date: Tue, 3 Jan 2023 08:57:34 -0500 (EST)

branch: externals/compat
commit ef5246cf5517e3120d75953e091e2e5c77398c29
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Fix issues related to 'expect' tests
---
 compat-tests.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index e4d68ebfdc..7ef404e17b 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -116,7 +116,7 @@ being compared against."
                                  ,(if (consp error-spec)
                                       `(equal res ',error-spec)
                                     `(eq (car res) ',error-spec)))))))))
-             (and (fboundp compat)
+             (if (fboundp compat)
                   `(ert-set-test
                     ',comp-test
                     (make-ert-test
@@ -124,11 +124,12 @@ being compared against."
                      :tags '(,name)
                      :body (lambda ()
                              (should
-                              (let ((res (should-error (,name ,@args) :type 
',error-type)))
+                              (let ((res (should-error (,compat ,@args) :type 
',error-type)))
                                 (should
                                  ,(if (consp error-spec)
                                       `(equal res ',error-spec)
-                                    `(eq (car res) ',error-spec))))))))))))))
+                                    `(eq (car res) ',error-spec))))))))
+                  (warn "Missing compat definition %S" compat)))))))
 
 (defmacro compat-deftests (name &rest body)
   "Test NAME in BODY."
@@ -138,7 +139,7 @@ being compared against."
          (real-name (if (consp name) (car name) name))
          (compat-name (if (consp name)
                           (cadr name)
-                        (intern (format "compat--%s" real-name))))
+                        (intern (format "compat--%S" real-name))))
          (env (list
                (cons 'ought (compat--ought real-name compat-name))
                (cons 'expect (compat--expect real-name compat-name)))))



reply via email to

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