diff options
| author | Daanturo <daanturo@gmail.com> | 2021-06-25 10:03:52 +0700 |
|---|---|---|
| committer | Youmu <condy0919@gmail.com> | 2021-06-25 23:15:17 +0800 |
| commit | 0a3b8b61b01143d2e443e952e2341fdf3b4dddde (patch) | |
| tree | 4c42155db9ded06498bce0cbd44d3ce61ec0f2ee | |
| parent | 4a9cb927ce1aa086ab16fe251ccfe6f0cdfa8bfb (diff) | |
Define tests for state filtering
| -rw-r--r-- | test/evil-collection-test.el | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/evil-collection-test.el b/test/evil-collection-test.el index 3c17b8a..a88fce4 100644 --- a/test/evil-collection-test.el +++ b/test/evil-collection-test.el @@ -5,4 +5,37 @@ "Zero check blank test." (should (equal 0 0))) +(ert-deftest evil-collection-filtering-states-test () + "Test `evil-collection--filter-states'." + (let ((evil-collection-state-denylist '()) + (evil-collection-state-passlist '())) + (should + (equal nil + (evil-collection--filter-states nil))) + (should + (equal '(normal) + (evil-collection--filter-states 'normal))) + (should + (equal '(normal) + (evil-collection--filter-states '(normal))))) + (let ((evil-collection-state-denylist '(insert)) + (evil-collection-state-passlist '())) + (should + (equal '() + (evil-collection--filter-states 'insert))) + (should + (equal '(visual) + (evil-collection--filter-states '(visual insert))))) + (let ((evil-collection-state-denylist '(insert)) + (evil-collection-state-passlist '(normal visual))) + (should + (equal '() + (evil-collection--filter-states '()))) + (should + (equal '(visual) + (evil-collection--filter-states '(insert visual)))) + (should + (seq-set-equal-p '(visual normal) + (evil-collection--filter-states '(motion normal visual insert)))))) + ;;; evil-collection-test.el ends here |
