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

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

[elpa] externals/compat c0c1889 57/99: Add compat-and-let* tests


From: ELPA Syncer
Subject: [elpa] externals/compat c0c1889 57/99: Add compat-and-let* tests
Date: Sun, 17 Oct 2021 05:57:57 -0400 (EDT)

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

    Add compat-and-let* tests
---
 compat-tests.el | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/compat-tests.el b/compat-tests.el
index a0a917a..d52ff93 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1242,5 +1242,25 @@ the compatibility function."
   (should-not
    (compat--if-let* (((= 5 6))) t nil)))
 
+(ert-deftest compat-and-let* ()
+  "Check if `compat--if-let*' was implemented properly."
+  (should                               ;trivial body
+   (compat--and-let*
+    ((x 3)
+     (y 2)
+     (z (+ x y))
+     ((= z 5))
+     (true t))
+    true))
+  (should                               ;no body
+   (compat--and-let*
+    ((x 3)
+     (y 2)
+     (z (+ x y))
+     ((= z 5))
+     (true t))))
+  (should-not
+   (compat--and-let* (((= 5 6))) t)))
+
 (provide 'compat-tests)
 ;;; compat-tests.el ends here



reply via email to

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