branch: externals/compat
commit 9d37a09a52f0033569e6b942f5fbfbfe7a513248
Author: Philip Kaludercic <phil...@posteo.net>
Commit: Philip Kaludercic <phil...@posteo.net>

    Avoid the usage of eval in named-let test
---
 compat-tests.el | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 8ba6f44503..4c61e738c4 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1121,15 +1121,11 @@ being compared against."
                 (cond ((= x 0) 'ok)
                       ((and t (lop (1- x))))))
               'ok))
-  (should (eq (eval
-               (let ((branch '((lop (and (setq b (not b)) (1+ i))))))
-                 `(let ((b t))
-                    (compat--named-let lop ((i 0))
-                      (cond ((null i) nil)
-                            ((= i 10000) 'ok)
-                            ,branch
-                            ,branch))))
-               t)
+  (should (eq (let ((b t))
+                (compat--named-let lop ((i 0))
+                  (cond ((null i) nil) ((= i 10000) 'ok)
+                        ((lop (and (setq b (not b)) (1+ i))))
+                        ((lop (and (setq b (not b)) (1+ i)))))))
               'ok)))
 
 (compat-deftest directory-name-p

Reply via email to