aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEli Zaretskii2019-01-28 17:24:04 +0200
committerEli Zaretskii2019-01-28 17:24:04 +0200
commitcd06d173a602bf0aa8a227ff1626dc70013fe480 (patch)
tree054908e08e1f1adcc8aace9b10e872e05e592b6a /test
parentfa7a841124578c00872d8a5aa834f6bbe57400ff (diff)
downloademacs-cd06d173a602bf0aa8a227ff1626dc70013fe480.tar.gz
emacs-cd06d173a602bf0aa8a227ff1626dc70013fe480.zip
Fix bug with face-id after restoring from pdump
* src/xfaces.c (init_xfaces): New function. * src/emacs.c (main) [HAVE_PDUMPER]: If dumped with pdumper, call init_xfaces. (Bug#34226) * src/lisp.h (init_xfaces) [HAVE_PDUMPER]: Add prototype. * test/lisp/faces-tests.el (faces--test-face-id): New test for bug#34226.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/faces-tests.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lisp/faces-tests.el b/test/lisp/faces-tests.el
index 4447dd7b309..f00c93cedcb 100644
--- a/test/lisp/faces-tests.el
+++ b/test/lisp/faces-tests.el
@@ -60,5 +60,14 @@
60 (should (equal (background-color-at-point) "black")) 60 (should (equal (background-color-at-point) "black"))
61 (should (equal (foreground-color-at-point) "black")))) 61 (should (equal (foreground-color-at-point) "black"))))
62 62
63(ert-deftest faces--test-face-id ()
64 ;; Face ID of 0 is the 'default' face; no face should have the same ID.
65 (should (> (face-id 'faces--test1) 0))
66 ;; 'tooltip' is the last face defined by preloaded packages, so any
67 ;; face we define in Emacs should have a face ID greater than that,
68 ;; since the ID of a face is just its index in the array that maps
69 ;; face IDs to faces.
70 (should (> (face-id 'faces--test1) (face-id 'tooltip))))
71
63(provide 'faces-tests) 72(provide 'faces-tests)
64;;; faces-tests.el ends here 73;;; faces-tests.el ends here