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

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

[elpa] externals/compat b97b756871 07/13: Restore if-let test


From: ELPA Syncer
Subject: [elpa] externals/compat b97b756871 07/13: Restore if-let test
Date: Wed, 4 Jan 2023 11:57:31 -0500 (EST)

branch: externals/compat
commit b97b7568717b023e80c5e79b48b13fe642e81193
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Restore if-let test
---
 compat-tests.el | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 96ec1de212..ded6e568ff 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1171,6 +1171,20 @@
     (remhash 1 ht)
     (should-equal '(two) (hash-table-values ht))))
 
+(ert-deftest if-let ()
+  (should (if-let (e (memq 0 '(1 2 3 0 5 6)))
+              e))
+  (should (if-let ((e (memq 0 '(1 2 3 0 5 6))))
+              e))
+  (should-not (if-let ((e (memq 0 '(1 2 3 5 6)))
+                               (d (memq 0 '(1 2 3 0 5 6))))
+                  t))
+  (should-not (if-let ((d (memq 0 '(1 2 3 0 5 6)))
+                               (e (memq 0 '(1 2 3 5 6))))
+                  t))
+  (should-not
+   (if-let (((= 5 6))) t nil)))
+
 (ert-deftest and-let* ()
   (should                               ;trivial body
    (and-let*
@@ -1620,18 +1634,6 @@
 ;;   (should-not
 ;;    (if-let* (((= 5 6))) t nil)))
 
-;; (ert-deftest if-let ()
-;;   (should (if-let ((e (memq 0 '(1 2 3 0 5 6))))
-;;               e))
-;;   (should-not (if-let ((e (memq 0 '(1 2 3 5 6)))
-;;                                (d (memq 0 '(1 2 3 0 5 6))))
-;;                   t))
-;;   (should-not (if-let ((d (memq 0 '(1 2 3 0 5 6)))
-;;                                (e (memq 0 '(1 2 3 5 6))))
-;;                   t))
-;;   (should-not
-;;    (if-let (((= 5 6))) t nil)))
-
 ;; (ert-deftest regexp-unmatchable ()
 ;;   (dolist (str '(""                     ;empty string
 ;;                  "a"                    ;simple string



reply via email to

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