emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/jade-mode f9522fc00a 105/128: reorder highlight tests to m


From: ELPA Syncer
Subject: [nongnu] elpa/jade-mode f9522fc00a 105/128: reorder highlight tests to match regex order in jade-mode.el and display
Date: Sat, 29 Jan 2022 08:24:51 -0500 (EST)

branch: elpa/jade-mode
commit f9522fc00a68ad0ecab30061eba0f988431d1c63
Author: Matthew Conway <matthew.f.conway@gmail.com>
Commit: Matthew Conway <matthew.f.conway@gmail.com>

    reorder highlight tests to match regex order in jade-mode.el and display
    word in ert should
---
 test/highlight-test.el | 12 ++++++------
 test/test-helper.el    |  9 +++++++--
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/test/highlight-test.el b/test/highlight-test.el
index 8d9c4aafa5..397faddbc3 100644
--- a/test/highlight-test.el
+++ b/test/highlight-test.el
@@ -13,13 +13,13 @@
              (point-at-eol)))))
 
 (ert-deftest jade-mode-highlights-in-isolation ()
-  (jade-test-highlight-one-word "doctype html" 'font-lock-comment-face 0)
-  (jade-test-highlight-one-word "head" 'font-lock-function-name-face 1)
-  (jade-test-highlight-one-word "body" 'font-lock-function-name-face 2)
+  (jade-test-highlight-one-word "mixin" 'font-lock-keyword-face 2)
+
   (jade-test-highlight-one-word "#container" 'font-lock-variable-name-face 2)
   (jade-test-highlight-one-word ".class" 'font-lock-type-face 2)
-  (jade-test-highlight-one-word "if" 'font-lock-keyword-face 2)
   (jade-test-highlight-one-word "// this is a comment" 'font-lock-comment-face 
2)
   (jade-test-highlight-one-word "//- this is a comment" 
'font-lock-comment-face 2)
-  (jade-test-highlight-one-word "//- this is a comment" 
'font-lock-comment-face 2)
-  (jade-test-highlight-one-word "-// this is a comment" 
'font-lock-comment-face 2))
+  (jade-test-highlight-one-word "-// this is a comment" 
'font-lock-comment-face 2)
+  (jade-test-highlight-one-word "head" 'font-lock-function-name-face 0)
+  (jade-test-highlight-one-word "body" 'font-lock-function-name-face 2)
+  (jade-test-highlight-one-word "doctype html" 'font-lock-comment-face 0))
diff --git a/test/test-helper.el b/test/test-helper.el
index 84174d3eae..34a6c3f7a8 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -26,12 +26,17 @@
   (and (eq (point) (point-max)) (goto-char (point-min)))
   (search-forward string nil t 1))
 
+(defun jade-test--show-tested-text (text form)
+  form)
+
 (defmacro jade-test-highlight-one-word (word face n)
   `(jade-test-with-temp-buffer-pt-min
        ,(concat (s-repeat n "\t") word "\n\n")
      (print (buffer-string))
-     (should (eq (get-text-property
-                  ,(+ 1 n) 'face)
+     (should (eq (jade-test--show-tested-text
+                  ,word
+                  (get-text-property
+                   ,(+ 1 n) 'face))
                  ,face))
      (goto-char ,(+ 1 n))
      (should (eq



reply via email to

[Prev in Thread] Current Thread [Next in Thread]