diff options
author | William Carroll <wpcarro@gmail.com> | 2022-08-05T18·41-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-08-05T18·44+0000 |
commit | b880fc4a14e8f49a0deeb9ff5c0562771d9a70e3 (patch) | |
tree | 404e0bb2617a3b7a4ef692dfb73d0a5de721539d /users/wpcarro/emacs/pkgs/list/tests.el | |
parent | 42e7254ad0d3c0589646f132f7a04dcd5bfb3523 (diff) |
refactor(wpcarro/emacs): Remove list.el's dep on dash.el 🎉 r/4384
Still pruning the dependency tree. Thank you, seq.el, from DWIMing. Change-Id: I797f08abe44853b9d297a99d5ba9e9bde3dcfeec Reviewed-on: https://cl.tvl.fyi/c/depot/+/6040 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro/emacs/pkgs/list/tests.el')
-rw-r--r-- | users/wpcarro/emacs/pkgs/list/tests.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/users/wpcarro/emacs/pkgs/list/tests.el b/users/wpcarro/emacs/pkgs/list/tests.el index a6096a1d6e92..e2fb5788d667 100644 --- a/users/wpcarro/emacs/pkgs/list/tests.el +++ b/users/wpcarro/emacs/pkgs/list/tests.el @@ -52,3 +52,16 @@ (list-chunk 3 '(1 2 3 4 5 6)))) (should (equal '((1 2) (3 4) (5 6)) (list-chunk 2 '(1 2 3 4 5 6))))) + +(ert-deftest list-find () + (should (equal 2 (list-find (lambda (x) (= 2 x)) '(1 2 3 4))))) + +(ert-deftest list-all? () + (should (equal t (list-all? (lambda (x) (= 2 x)) nil))) + (should (null (list-all? (lambda (x) (= 2 x)) '(1 2 3)))) + (should (equal t (list-all? (lambda (x) (= 2 x)) '(2 2 2 2))))) + +(ert-deftest list-any? () + (should (null (list-any? (lambda (x) (= 2 x)) nil))) + (should (equal t (list-any? (lambda (x) (= 2 x)) '(1 2 3)))) + (should (null (list-any? (lambda (x) (= 4 x)) '(1 2 3))))) |