aboutsummaryrefslogtreecommitdiff
path: root/tests/test-debug-wttrin-disable.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 05:20:44 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 05:20:44 -0500
commit35131cb72c08c657d2a3389338d0c049d57e69bd (patch)
treead377579abb8bc143dd57c9a4f63fa244d137a94 /tests/test-debug-wttrin-disable.el
parent306c4ea1dd07de0d862c0943aeb8b7e170a1b343 (diff)
downloademacs-wttrin-35131cb72c08c657d2a3389338d0c049d57e69bd.tar.gz
emacs-wttrin-35131cb72c08c657d2a3389338d0c049d57e69bd.zip
refactor: rename debug-wttrin-* commands to wttrin-debug-* with obsolete aliases
The four interactive commands in `wttrin-debug.el` used `debug-wttrin-` as their prefix instead of the package's `wttrin-debug-` prefix. package-lint flags this as a convention violation, and it makes M-x discovery slightly less consistent for users. Renamed: - `debug-wttrin-show-raw` -> `wttrin-debug-show-raw` - `debug-wttrin-enable` -> `wttrin-debug-enable` - `debug-wttrin-disable` -> `wttrin-debug-disable` - `debug-wttrin-mode-line` -> `wttrin-debug-mode-line` The old names stay available as `define-obsolete-function-alias` entries marked since 0.4.0, so anyone with a keybinding or `(call-interactively 'debug-wttrin-enable)` in their config keeps working. The byte-compiler will emit an obsolescence warning to nudge migration. Aliases will be removed in a future release. Internal caller `wttrin--debug-mode-line-info` now invokes the new name. Test files renamed to match (`test-debug-wttrin-*.el` -> `test-wttrin-debug-*.el`); inside each, ert-deftest names and function calls were updated. Added `tests/test-wttrin-debug-aliases.el` to verify each old name resolves via `indirect-function` to the new name and carries `byte-obsolete-info` with the expected target and "0.4.0" version.
Diffstat (limited to 'tests/test-debug-wttrin-disable.el')
-rw-r--r--tests/test-debug-wttrin-disable.el43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/test-debug-wttrin-disable.el b/tests/test-debug-wttrin-disable.el
deleted file mode 100644
index dc560c3..0000000
--- a/tests/test-debug-wttrin-disable.el
+++ /dev/null
@@ -1,43 +0,0 @@
-;;; test-debug-wttrin-disable.el --- Tests for debug-wttrin-disable -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2025-2026 Craig Jennings
-
-;;; Commentary:
-
-;; Unit tests for debug-wttrin-disable. Verifies the interactive command
-;; clears `wttrin-debug' and is idempotent when already disabled.
-
-;;; Code:
-
-(require 'ert)
-(require 'wttrin)
-(require 'testutil-wttrin)
-
-(require 'wttrin-debug
- (expand-file-name "wttrin-debug.el"
- (file-name-directory (locate-library "wttrin"))))
-
-;;; Normal Cases
-
-(ert-deftest test-debug-wttrin-disable-normal-flips-from-t-to-nil ()
- "Calling disable when wttrin-debug is t sets it to nil."
- (let ((wttrin-debug t))
- (debug-wttrin-disable)
- (should-not wttrin-debug)))
-
-(ert-deftest test-debug-wttrin-disable-normal-idempotent-when-already-disabled ()
- "Calling disable when wttrin-debug is already nil leaves it nil."
- (let ((wttrin-debug nil))
- (debug-wttrin-disable)
- (should-not wttrin-debug)))
-
-;;; Boundary Cases
-
-(ert-deftest test-debug-wttrin-disable-boundary-clears-non-boolean-truthy-value ()
- "Calling disable replaces any truthy value with nil."
- (let ((wttrin-debug 'verbose))
- (debug-wttrin-disable)
- (should-not wttrin-debug)))
-
-(provide 'test-debug-wttrin-disable)
-;;; test-debug-wttrin-disable.el ends here