aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-04 13:27:30 -0500
committerCraig Jennings <c@cjennings.net>2026-04-04 13:27:30 -0500
commit6d133a26f905cf38595599eb3271563911762e2b (patch)
tree07e0e2bc377e631aea875f80ee513ac0f52cb210 /tests
parent39989d8b826a03e304e40032aecc33de24f4227e (diff)
downloadchime-6d133a26f905cf38595599eb3271563911762e2b.tar.gz
chime-6d133a26f905cf38595599eb3271563911762e2b.zip
Nil chime--timer after cancellation in chime--stop
The timer variable was left pointing at a cancelled timer object. Now set to nil so state accurately reflects no active timer.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-integration-chime-mode.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test-integration-chime-mode.el b/tests/test-integration-chime-mode.el
index b29b123..0f19330 100644
--- a/tests/test-integration-chime-mode.el
+++ b/tests/test-integration-chime-mode.el
@@ -54,5 +54,16 @@ and set it to nil."
(should-not (memq 'chime-modeline-string global-mode-string))
(should (null chime-modeline-string))))
+(ert-deftest test-integration-chime-mode-disable-nils-timer ()
+ "Disabling chime-mode should set chime--timer to nil."
+ (let ((chime-enable-modeline t)
+ (chime-modeline-lookahead-minutes 60))
+ (chime-mode 1)
+ ;; Timer should exist after enable
+ (should chime--timer)
+ (chime-mode -1)
+ ;; Timer should be nil after disable
+ (should (null chime--timer))))
+
(provide 'test-integration-chime-mode)
;;; test-integration-chime-mode.el ends here