File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 13
13
(point-at-eol )))))
14
14
15
15
(ert-deftest jade-mode-highlights-in-isolation ()
16
- (jade-test-highlight-one-word " doctype html" 'font-lock-comment-face 0 )
17
- (jade-test-highlight-one-word " head" 'font-lock-function-name-face 1 )
18
- (jade-test-highlight-one-word " body" 'font-lock-function-name-face 2 )
16
+ (jade-test-highlight-one-word " mixin" 'font-lock-keyword-face 2 )
17
+
19
18
(jade-test-highlight-one-word " #container" 'font-lock-variable-name-face 2 )
20
19
(jade-test-highlight-one-word " .class" 'font-lock-type-face 2 )
21
- (jade-test-highlight-one-word " if" 'font-lock-keyword-face 2 )
22
20
(jade-test-highlight-one-word " // this is a comment" 'font-lock-comment-face 2 )
23
21
(jade-test-highlight-one-word " //- this is a comment" 'font-lock-comment-face 2 )
24
- (jade-test-highlight-one-word " //- this is a comment" 'font-lock-comment-face 2 )
25
- (jade-test-highlight-one-word " -// this is a comment" 'font-lock-comment-face 2 ))
22
+ (jade-test-highlight-one-word " -// this is a comment" 'font-lock-comment-face 2 )
23
+ (jade-test-highlight-one-word " head" 'font-lock-function-name-face 0 )
24
+ (jade-test-highlight-one-word " body" 'font-lock-function-name-face 2 )
25
+ (jade-test-highlight-one-word " doctype html" 'font-lock-comment-face 0 ))
Original file line number Diff line number Diff line change 26
26
(and (eq (point ) (point-max )) (goto-char (point-min )))
27
27
(search-forward string nil t 1 ))
28
28
29
+ (defun jade-test--show-tested-text (text form )
30
+ form)
31
+
29
32
(defmacro jade-test-highlight-one-word (word face n )
30
33
`(jade-test-with-temp-buffer-pt-min
31
34
,(concat (s-repeat n " \t " ) word " \n\n " )
32
35
(print (buffer-string ))
33
- (should (eq (get-text-property
34
- ,(+ 1 n) 'face )
36
+ (should (eq (jade-test--show-tested-text
37
+ , word
38
+ (get-text-property
39
+ ,(+ 1 n) 'face ))
35
40
, face ))
36
41
(goto-char ,(+ 1 n))
37
42
(should (eq
You can’t perform that action at this time.
0 commit comments