branch: elpa/clojure-ts-mode
commit f36cbf9c4a66fa7838214eb8dfac0d3d711ae8ab
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Add font-lock tests for dynamic vars, old-style metadata, and definline 
docstrings
---
 test/clojure-ts-mode-font-lock-test.el | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/test/clojure-ts-mode-font-lock-test.el 
b/test/clojure-ts-mode-font-lock-test.el
index ab639ffa9d..1586424a3f 100644
--- a/test/clojure-ts-mode-font-lock-test.el
+++ b/test/clojure-ts-mode-font-lock-test.el
@@ -169,6 +169,23 @@ DESCRIPTION is the description of the spec."
      (2 5 font-lock-type-face)
      (8 9 font-lock-keyword-face)))
 
+  (when-fontifying-it "old-style-metadata"
+    ("(def #^:private my-var true)"
+     (6 7 font-lock-operator-face)
+     (8 15 clojure-ts-keyword-face)))
+
+  (when-fontifying-it "dynamic-variables"
+    ("*out*" (1 5 font-lock-builtin-face))
+    ("*in*" (1 4 font-lock-builtin-face))
+    ("*ns*" (1 4 font-lock-builtin-face))
+    ("*err*" (1 5 font-lock-builtin-face)))
+
+  (when-fontifying-it "metadata-docstring-for-definline"
+    ("(definline ^{:doc \"my doc\"} my-fn [x] x)"
+     (14 17 clojure-ts-keyword-face)
+     (19 26 font-lock-doc-face)
+     (29 33 font-lock-function-name-face)))
+
   (when-fontifying-it "function literals"
     ("#(or one two)"
      (3 4 font-lock-keyword-face)))

Reply via email to