[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/jade-mode 932a2fef33 095/128: [#46] start unit test file f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/jade-mode 932a2fef33 095/128: [#46] start unit test file for highlighting |
Date: |
Sat, 29 Jan 2022 08:24:50 -0500 (EST) |
branch: elpa/jade-mode
commit 932a2fef33db14cf3ecaf7c5c56f26fb5e403378
Author: Travis Jefferson <tjefferson@signpost.com>
Commit: Travis Jefferson <tjefferson@signpost.com>
[#46] start unit test file for highlighting
---
jade-mode.el | 2 +-
tests/highlight.el | 33 +++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/jade-mode.el b/jade-mode.el
index d9d78b8d82..c288ffe0c6 100644
--- a/jade-mode.el
+++ b/jade-mode.el
@@ -119,7 +119,7 @@
(jade-highlight-js-after-tag 1 font-lock-preprocessor-face)
;; doctype re-overrides some of the fontification rules
- ("!!!\\|doctype[ ]?.*" 0 font-lock-comment-face t)))
+ ("^!!!\\|doctype[ ]?.*" 0 font-lock-comment-face t)))
(defun jade-highlight-js-in-parens (limit)
"Search for a tag declaration (up to LIMIT) which contains a paren
diff --git a/tests/highlight.el b/tests/highlight.el
new file mode 100644
index 0000000000..868d24d953
--- /dev/null
+++ b/tests/highlight.el
@@ -0,0 +1,33 @@
+(require 'ert)
+(require 'jade-mode)
+
+(ert-deftest jade-mode-command-should-be-bound ()
+ (with-temp-buffer
+ (should (fboundp 'jade-mode))
+ (should (null (jade-mode)))))
+
+(ert-deftest jade-mode-highlight-doctype ()
+ (with-temp-buffer
+
+ ;; interesting - if you omit the trailing newline in the string,
+ ;; `font-lock-fontify-buffer' will freak out and fail with
+ ;; end-of-buffer
+ (insert "doctype html\nhtml content\n\n")
+ (jade-mode)
+
+ ;; temp buffers require explict fontification
+ (font-lock-fontify-buffer)
+
+ ;; face at char 1 should be `font-lock-comment-face'
+ (should (eq
+ (get-text-property 1 'face)
+ 'font-lock-comment-face))
+ (goto-char 1)
+
+ ;; face shouldn't change (from `font-lock-comment-face') b/t char
+ ;; 1 and eol
+ (should (=
+ (next-single-property-change (point) 'face)
+ (point-at-eol)))))
+
+
- [nongnu] elpa/jade-mode b33e7017f7 052/128: Defvar instead of setq, (continued)
- [nongnu] elpa/jade-mode b33e7017f7 052/128: Defvar instead of setq, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode fd1a442556 059/128: Add missing jade keywords "block append", "block prepend", "append" and "prepend", ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 992ed1e50d 046/128: single quoted strings are now properly highlighted., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 210825fd5e 032/128: Change class facename to font-lock-type-face., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 7ff3a4cb0a 035/128: Use local variables settings already in the sws-mode., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 0a9ddef0eb 090/128: tweak example.jade so it'll actually render, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 73893e8d8f 077/128: Merge pull request #34 from zonuexe/fix/auto-mode-tail-match, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode e621d186c1 080/128: Merge pull request #36 from tjefferson08/remove_hl_after_tags, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 449df109fc 074/128: fix unbound variable reference in let binding, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 279df56bf9 100/128: add some tests for indentation (new file), ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 932a2fef33 095/128: [#46] start unit test file for highlighting,
ELPA Syncer <=
- [nongnu] elpa/jade-mode 473d29b5c2 091/128: move doctype in rendering order, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 8a25dd6702 024/128: Merge pull request #4 from travisjeffery/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 41351ec293 027/128: Add autoload declarations, explicit requires and ELPA package dependencies., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode c513eded33 045/128: the string doctype now works as a doctype keyword., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode a1cbadd84d 026/128: add .el file headers to enable automatic packaging - closes gh#6, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 4d2f58abd7 044/128: Merge https://github.com/brianc/jade-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 62c012c8d6 039/128: Improved Stylus comments syntax highlighting., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 00c789673f 068/128: Closes #26. Fix inline '//' highlight as comment, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 8f61e0dc6a 040/128: Decimal point can be part of a constant., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 109b9850d2 041/128: Created a syntax table for Stylus mode., ELPA Syncer, 2022/01/29