branch: externals/compat commit c0c18895c75a6cc8b34a8c351cf76b7e1bee6f19 Author: Philip Kaludercic <phil...@posteo.net> Commit: Philip Kaludercic <phil...@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