aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-20 23:31:59 -0500
committerCraig Jennings <c@cjennings.net>2026-07-20 23:31:59 -0500
commit22006b0eaf357ec9ef1538492f497e4f0b8fb4bf (patch)
tree142796bf983c01dc6d01e36bbb3a6a91f43d9034 /tests
parent2350d34ceb68aac74b87a518467a71476a204d5e (diff)
downloaddotemacs-22006b0eaf357ec9ef1538492f497e4f0b8fb4bf.tar.gz
dotemacs-22006b0eaf357ec9ef1538492f497e4f0b8fb4bf.zip
fix(dashboard): make the bookmarks override real
The top-level defun was clobbered when use-package reloaded dashboard-widgets, so the override never ran. Deferring it kept it alive but exposed a second bug: dashboard-insert-section is a macro, unknown at module compile time, so the body compiled as a function call and crashed void-variable at render. The override now registers after dashboard-widgets and compiles with the macro known.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dashboard-config.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test-dashboard-config.el b/tests/test-dashboard-config.el
index 2dbcd4f4..3a48ee56 100644
--- a/tests/test-dashboard-config.el
+++ b/tests/test-dashboard-config.el
@@ -56,5 +56,15 @@ start at the top. Without `set-window-start', batch redisplay leaves
(when (buffer-live-p dash)
(kill-buffer dash)))))
+(ert-deftest test-dashboard-config-bookmark-override-deferred-to-package-load ()
+ "Normal: the bookmarks override is defined exactly when dashboard-widgets is.
+A bare top-level defun would exist even without the package (and be
+clobbered when the package loads); the deferred registration means the
+function tracks the package's own load state. Holds in both runners:
+the hook env loads dashboard, the make-test env can't."
+ (if (featurep 'dashboard-widgets)
+ (should (fboundp 'dashboard-insert-bookmarks))
+ (should-not (fboundp 'dashboard-insert-bookmarks))))
+
(provide 'test-dashboard-config)
;;; test-dashboard-config.el ends here