From 423b6b62296df0558cf16f286dd268e0b49b3bce Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Sat, 7 Nov 2020 09:53:21 -0300 Subject: [PATCH] Add test for recent change in enable-theme * test/lisp/custom-tests.el (custom-test-enable-theme-keeps-settings): Enabling a theme should not change the theme settings, so test for that. See https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00232.html --- test/lisp/custom-tests.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/lisp/custom-tests.el b/test/lisp/custom-tests.el index a1451cf0ce6..7691f167738 100644 --- a/test/lisp/custom-tests.el +++ b/test/lisp/custom-tests.el @@ -156,4 +156,13 @@ (load custom-test-admin-cus-test) (should (null (cus-test-opts t)))) +(ert-deftest custom-test-enable-theme-keeps-settings () + "Test that enabling a theme doesn't change its settings." + (let* ((custom-theme-load-path `(,(ert-resource-directory))) + settings) + (load-theme 'custom--test 'no-confirm 'no-enable) + (setq settings (get 'custom--test 'theme-settings)) + (enable-theme 'custom--test) + (should (equal settings (get 'custom--test 'theme-settings))))) + ;;; custom-tests.el ends here -- 2.39.2