aboutsummaryrefslogtreecommitdiff
path: root/tests/test-chime-numeric-defcustom-setters.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 12:24:56 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 12:24:56 -0500
commit0b65f607102c12260c7cca5df3d8586c2b1a24bd (patch)
treed3b3128ffb09e8bb44a9f631c72fee9a32a76f65 /tests/test-chime-numeric-defcustom-setters.el
parentef8d5819b3cab677828e2ac21e780c78227acedb (diff)
downloadchime-0b65f607102c12260c7cca5df3d8586c2b1a24bd.tar.gz
chime-0b65f607102c12260c7cca5df3d8586c2b1a24bd.zip
refactor!: demote chime-validation-max-retries to private defvar
This is an internal startup-timing parameter, not a knob real users have reason to tune through `M-x customize'. I demoted it from defcustom to defvar and renamed it to `chime--validation-max-retries' to make the private status explicit. Anyone who was overriding it can keep doing so with `setq' (the variable still exists, just under the new name). The three customize-time validation tests went away with the defcustom — nothing left to validate at customize-time once it stops being a customize-target. The setter helper still applies to the other five numeric defcustoms. Test files that referenced the variable (`test-chime-validation-retry.el', `test-integration-chime-mode.el') were renamed mechanically along with the source. Breaking change: `(setq chime-validation-max-retries N)' becomes `(setq chime--validation-max-retries N)' if you actually had it. Most users won't have touched it.
Diffstat (limited to 'tests/test-chime-numeric-defcustom-setters.el')
-rw-r--r--tests/test-chime-numeric-defcustom-setters.el22
1 files changed, 2 insertions, 20 deletions
diff --git a/tests/test-chime-numeric-defcustom-setters.el b/tests/test-chime-numeric-defcustom-setters.el
index 03d7810..7fb5afa 100644
--- a/tests/test-chime-numeric-defcustom-setters.el
+++ b/tests/test-chime-numeric-defcustom-setters.el
@@ -161,26 +161,8 @@
'chime-max-consecutive-failures -1)
:type 'user-error)))
-;;;; chime-validation-max-retries — integer >= 0
-
-(ert-deftest test-chime-validation-max-retries-accepts-zero ()
- "Normal: 0 means show errors immediately without retrying (per docstring)."
- (let ((chime-validation-max-retries 3))
- (customize-set-variable 'chime-validation-max-retries 0)
- (should (= 0 chime-validation-max-retries))))
-
-(ert-deftest test-chime-validation-max-retries-accepts-positive ()
- "Normal: positive integer is valid."
- (let ((chime-validation-max-retries 3))
- (customize-set-variable 'chime-validation-max-retries 5)
- (should (= 5 chime-validation-max-retries))))
-
-(ert-deftest test-chime-validation-max-retries-rejects-negative ()
- "Error: negative retry count is meaningless."
- (let ((chime-validation-max-retries 3))
- (should-error (customize-set-variable
- 'chime-validation-max-retries -1)
- :type 'user-error)))
+;; Note: `chime--validation-max-retries' was demoted from defcustom to
+;; defvar in 0.8 — no customize-time setter, no validation tests here.
(provide 'test-chime-numeric-defcustom-setters)
;;; test-chime-numeric-defcustom-setters.el ends here