]> git.eshelyaron.com Git - emacs.git/commitdiff
Add test for recent change in enable-theme
authorMauro Aranda <maurooaranda@gmail.com>
Sat, 7 Nov 2020 12:53:21 +0000 (09:53 -0300)
committerMauro Aranda <maurooaranda@gmail.com>
Sat, 7 Nov 2020 12:53:21 +0000 (09:53 -0300)
* 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

index a1451cf0ce69055480d5713b92725ad2e5a2ab3f..7691f1677387a35032a1d113740f2bfa73c0a0bc 100644 (file)
   (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