[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1d7761c 37/47: Add constant comment test.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 1d7761c 37/47: Add constant comment test. |
Date: |
Mon, 18 May 2015 09:52:03 +0000 |
branch: master
commit 1d7761cfe379df92226216ad0fa49aa7fb619cb3
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Add constant comment test.
---
test/context-coloring-test.el | 23 +++++++++++++++++++++--
test/fixtures/depth.el | 2 ++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index 5007c3c..7466e23 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -212,9 +212,9 @@ environment."
"Assert that the face at POSITION satisfies FACE-REGEXP."
(let ((face (get-text-property position 'face)))
(when (or
- ;; Pass a non-string to do an `eq' check (against a symbol or nil).
+ ;; Pass a non-string to do an `equal' check (against a symbol or
nil).
(unless (stringp face-regexp)
- (not (eq face-regexp face)))
+ (not (equal face-regexp face)))
;; Otherwise do the matching.
(when (stringp face-regexp)
(not (string-match-p face-regexp (symbol-name face)))))
@@ -229,6 +229,10 @@ environment."
(context-coloring-test-assert-position-face
position "\\`font-lock-comment\\(-delimiter\\)?-face\\'"))
+(defun context-coloring-test-assert-position-constant-comment (position)
+ (context-coloring-test-assert-position-face position
'(font-lock-constant-face
+
font-lock-comment-face)))
+
(defun context-coloring-test-assert-position-string (position)
(context-coloring-test-assert-position-face position 'font-lock-string-face))
@@ -260,6 +264,10 @@ environment."
((= char 59)
(context-coloring-test-assert-position-comment (point))
(forward-char))
+ ;; 'c' = Constant comment
+ ((= char 99)
+ (context-coloring-test-assert-position-constant-comment (point))
+ (forward-char))
;; 's' = String
((= char 115)
(context-coloring-test-assert-position-string (point))
@@ -1163,6 +1171,17 @@ see that function."
2222 1 1 2 2 2 000022
1111 1 1 1 0 0 000011")))
+(context-coloring-test-deftest-emacs-lisp-mode depth
+ (lambda ()
+ (let ((context-coloring-emacs-lisp-iterations-per-pause 1))
+ (context-coloring-colorize)
+ (context-coloring-test-assert-coloring "
+;; `cc' `cc'
+(xxxxx x ())")))
+ :setup (lambda ()
+ (setq context-coloring-syntactic-comments t)
+ (setq context-coloring-syntactic-strings t)))
+
(provide 'context-coloring-test)
;;; context-coloring-test.el ends here
diff --git a/test/fixtures/depth.el b/test/fixtures/depth.el
new file mode 100644
index 0000000..c4e99ac
--- /dev/null
+++ b/test/fixtures/depth.el
@@ -0,0 +1,2 @@
+;; `aa' `bb'
+(defun a ())
- [elpa] master 3fc5b20 27/47: Make dispatches fully redefinable., (continued)
- [elpa] master 3fc5b20 27/47: Make dispatches fully redefinable., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 89f20e4 28/47: Improve interruptability of syntactic coloring., Jackson Ray Hamilton, 2015/05/18
- [elpa] master d24de46 31/47: Add TODO., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 07c5852 30/47: Add idle change teardown function., Jackson Ray Hamilton, 2015/05/18
- [elpa] master ef544ef 29/47: Fontify keywords., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 5c5b429 32/47: Fix font-lock error., Jackson Ray Hamilton, 2015/05/18
- [elpa] master c0a6689 33/47: Only set defaults when the mode is enabled., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 59a6c8e 34/47: Fix timer disposal and timer buffer detection., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 88a921f 35/47: Improve defun regexp., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 438cb33 36/47: Fix incorrect last fontified position., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 1d7761c 37/47: Add constant comment test.,
Jackson Ray Hamilton <=
- [elpa] master 4ff6e82 39/47: Remove verbose parsing., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 4bbce56 38/47: Add test for interruption., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 6392d1f 40/47: Bind optional parameters earlier., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 5051a70 42/47: Update documentation for emacs lisp., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 6a4ad31 43/47: Add derived mode support., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 3b6a391 44/47: Minor cleanup., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 708276e 41/47: Compiler micro-optimizations., Jackson Ray Hamilton, 2015/05/18
- [elpa] master 3bf805d 46/47: Version 6.3.0., Jackson Ray Hamilton, 2015/05/18
- [elpa] master c6e173b 45/47: Merge branch 'elisp', Jackson Ray Hamilton, 2015/05/18
- [elpa] master b525e2d 47/47: Merge commit '3bf805df83fe6f110f3e7e8ce2dc37e0cf6c14cb' from context-coloring, Jackson Ray Hamilton, 2015/05/18