diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-16 14:50:29 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-16 14:50:29 -0500 |
| commit | 9b41fb33ea92420e372bc702004a04825555f16b (patch) | |
| tree | bd9a122133b085872d3f1fbe3fdec2d4d68174ed /tests/test-system-utils-scratch-background.el | |
| parent | 43872c7c20e64098ee19a05727e651be6955b9a1 (diff) | |
| download | dotemacs-9b41fb33ea92420e372bc702004a04825555f16b.tar.gz dotemacs-9b41fb33ea92420e372bc702004a04825555f16b.zip | |
refactor(system-utils): remove the *scratch* background tint
I dropped the buffer-local face remap that lightened the *scratch* background 5% above the theme default. Scratch now uses the plain theme background like every other buffer. The startup hook still moves the cursor to end-of-scratch. Only the tint call, its two helpers, the defcustom, the color require, and the now-orphaned test go.
Diffstat (limited to 'tests/test-system-utils-scratch-background.el')
| -rw-r--r-- | tests/test-system-utils-scratch-background.el | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/test-system-utils-scratch-background.el b/tests/test-system-utils-scratch-background.el deleted file mode 100644 index 422590f4b..000000000 --- a/tests/test-system-utils-scratch-background.el +++ /dev/null @@ -1,30 +0,0 @@ -;;; test-system-utils-scratch-background.el --- Tests for the scratch tint -*- lexical-binding: t; -*- - -;;; Commentary: -;; cj/--scratch-lightened-background lightens the default background by a -;; tunable percent for the *scratch* buffer's buffer-local face remap. The -;; colour arithmetic (color-lighten-name -> color-name-to-rgb) is -;; display-dependent and returns zeros under --batch, so the actual lightening -;; is verified live in the daemon; here we cover the display-independent -;; contract: a usable colour string yields a string, junk yields nil. - -;;; Code: - -(require 'ert) -(require 'color) -(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory)) -(require 'system-utils) - -(ert-deftest test-system-utils-scratch-lightened-background-returns-string () - "Normal: a valid hex colour yields a colour string (not nil)." - (let ((cj/scratch-background-lighten 5)) - (should (stringp (cj/--scratch-lightened-background "#100f0f"))))) - -(ert-deftest test-system-utils-scratch-lightened-background-bad-input () - "Error: non-colour input yields nil rather than signalling." - (should (null (cj/--scratch-lightened-background nil))) - (should (null (cj/--scratch-lightened-background 'unspecified))) - (should (null (cj/--scratch-lightened-background "not-a-color")))) - -(provide 'test-system-utils-scratch-background) -;;; test-system-utils-scratch-background.el ends here |
