diff options
Diffstat (limited to 'test/oni-core-test.el')
-rw-r--r-- | test/oni-core-test.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/oni-core-test.el b/test/oni-core-test.el index 0672fb3..eb9886e 100644 --- a/test/oni-core-test.el +++ b/test/oni-core-test.el @@ -59,3 +59,12 @@ (oni-core-move-end-of-dwim) (oni-core-move-end-of-dwim) (should (equal 21 (point))))) + +(ert-deftest oni-core-loading-is-idempotent-recentf-idle-timer () + "Test that loading ‘oni-core’ is idempotent in regards to an idle timer." + ;; We already loaded it with the ‘require’ call above. We load it again so we + ;; can check that the timer set up in it doesn’t appear twice. + (load-library "oni-core") + (let* ((pred (lambda (elt) (eq 'recentf-save-list (aref elt 5)))) + (matches (delete nil (mapcar pred timer-idle-list)))) + (should (eq 1 (length matches))))) |