41
41
(goto-char (point-min ))
42
42
,@body ))
43
43
44
- (defmacro clojurex-test-with-temp-buffer (content &rest body )
45
- " Evaluate BODY in a temporary buffer with CONTENTS."
46
- (declare (debug t )
47
- (indent 1 ))
48
- `(with-temp-buffer
49
- (insert , content )
50
- (clojurex-mode)
51
- (font-lock-fontify-buffer )
52
- (goto-char (point-min ))
53
- ,@body ))
54
-
55
44
(defun clojure-get-face-at-range (start end )
56
45
(let ((start-face (get-text-property start 'face ))
57
46
(all-faces (cl-loop for i from start to end collect (get-text-property i 'face ))))
@@ -69,16 +58,6 @@ buffer."
69
58
(clojure-get-face-at-range start end))
70
59
(clojure-get-face-at-range start end)))
71
60
72
- (defun clojurex-test-face-at (start end &optional content )
73
- " Get the face between START and END in CONTENT.
74
-
75
- If CONTENT is not given, return the face at the specified range in the current
76
- buffer."
77
- (if content
78
- (clojurex-test-with-temp-buffer content
79
- (clojure-get-face-at-range start end))
80
- (clojure-get-face-at-range start end)))
81
-
82
61
(defconst clojure-test-syntax-classes
83
62
[whitespace punctuation word symbol open-paren close-paren expression-prefix
84
63
string-quote paired-delim escape character-quote comment-start
@@ -322,11 +301,6 @@ POS."
322
301
(should (eq (clojure-test-face-at 1 2 " \\ ," ) 'clojure-character-face ))
323
302
(should (eq (clojure-test-face-at 1 2 " \\ ;" ) 'clojure-character-face )))
324
303
325
- (ert-deftest clojurex-mode-syntax-table/cljx ()
326
- :tags '(fontification syntax-table)
327
- (should (eq (clojurex-test-face-at 1 5 " #+clj x" ) 'font-lock-preprocessor-face ))
328
- (should (eq (clojurex-test-face-at 1 6 " #+cljs x" ) 'font-lock-preprocessor-face )))
329
-
330
304
(ert-deftest clojure-mode-syntax-table/refer-ns ()
331
305
:tags '(fontification syntax-table)
332
306
(should (eq (clojure-test-face-at 1 3 " foo/var" ) 'font-lock-type-face ))
0 commit comments