aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEshel Yaron2025-10-07 23:57:35 +0200
committerEshel Yaron2025-10-08 00:06:00 +0200
commitd1d06099d65c298c7260c26c131d4e5779b0f944 (patch)
tree749ff9410960787971298473c3fa8984eb991915
parent94d314d756bfb1d3bd817a9749fb7623ee16d94f (diff)
downloademacs-d1d06099d65c298c7260c26c131d4e5779b0f944.tar.gz
emacs-d1d06099d65c298c7260c26c131d4e5779b0f944.zip
; Add semantic highlighting test with 'when-let*'
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el: Add test form with 'when-let*'. * test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock): Trust temporary test buffer.
-rw-r--r--test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el10
-rw-r--r--test/lisp/progmodes/elisp-mode-tests.el9
2 files changed, 15 insertions, 4 deletions
diff --git a/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el b/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el
index d72e8d49fb4..e07438a2fc5 100644
--- a/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el
+++ b/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el
@@ -111,3 +111,13 @@
111;; ^ elisp-macro-call 111;; ^ elisp-macro-call
112 (foo)))) 112 (foo))))
113;; ^ elisp-macro-call 113;; ^ elisp-macro-call
114
115(when-let* ((foo (symbol-at-point))
116;; ^ (elisp-macro-call font-lock-keyword-face)
117;; ^ elisp-binding-variable
118
119 ((commandp foo)))
120;; ^ elisp-function-reference
121;; ^ elisp-bound-variable
122 foo)
123;; ^ elisp-bound-variable
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el
index e7ae7bb79ba..0e1bff600b1 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -1149,10 +1149,11 @@ evaluation of BODY."
1149 (should-error (scan-sexps (+ (point-min) 3) 1)))) 1149 (should-error (scan-sexps (+ (point-min) 3) 1))))
1150 1150
1151(ert-deftest elisp-test-font-lock () 1151(ert-deftest elisp-test-font-lock ()
1152 (let ((elisp-fontify-semantically t)) 1152 (ert-font-lock-test-file (ert-resource-file "semantic-highlighting.el")
1153 (ert-font-lock-test-file 1153 (lambda ()
1154 (ert-resource-file "semantic-highlighting.el") 1154 (emacs-lisp-mode)
1155 'emacs-lisp-mode))) 1155 (setq-local trusted-content :all
1156 elisp-fontify-semantically t))))
1156 1157
1157(provide 'elisp-mode-tests) 1158(provide 'elisp-mode-tests)
1158;;; elisp-mode-tests.el ends here 1159;;; elisp-mode-tests.el ends here