Skip to content

Commit f36cbf9

Browse files
committed
Add font-lock tests for dynamic vars, old-style metadata, and definline docstrings
1 parent c695836 commit f36cbf9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

test/clojure-ts-mode-font-lock-test.el

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,23 @@ DESCRIPTION is the description of the spec."
169169
(2 5 font-lock-type-face)
170170
(8 9 font-lock-keyword-face)))
171171

172+
(when-fontifying-it "old-style-metadata"
173+
("(def #^:private my-var true)"
174+
(6 7 font-lock-operator-face)
175+
(8 15 clojure-ts-keyword-face)))
176+
177+
(when-fontifying-it "dynamic-variables"
178+
("*out*" (1 5 font-lock-builtin-face))
179+
("*in*" (1 4 font-lock-builtin-face))
180+
("*ns*" (1 4 font-lock-builtin-face))
181+
("*err*" (1 5 font-lock-builtin-face)))
182+
183+
(when-fontifying-it "metadata-docstring-for-definline"
184+
("(definline ^{:doc \"my doc\"} my-fn [x] x)"
185+
(14 17 clojure-ts-keyword-face)
186+
(19 26 font-lock-doc-face)
187+
(29 33 font-lock-function-name-face)))
188+
172189
(when-fontifying-it "function literals"
173190
("#(or one two)"
174191
(3 4 font-lock-keyword-face)))

0 commit comments

Comments
 (0)