emacs-diffs
[Top][All Lists]
Advanced

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

master ac1b6e9 2/2: Rename faces used in faces-tests.el


From: Dmitry Gutov
Subject: master ac1b6e9 2/2: Rename faces used in faces-tests.el
Date: Mon, 9 Dec 2019 19:17:10 -0500 (EST)

branch: master
commit ac1b6e97b6a6a87e5f36b0f002b4a2d77381e628
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Rename faces used in faces-tests.el
    
    * test/data/themes/faces-test-light-theme.el:
    * test/data/themes/faces-test-dark-theme.el: Update accordingly.
    
    * test/lisp/faces-tests.el (faces--test-extend-with-themes):
    Don't use the diff-mode faces.  Rename the definitions.
---
 test/data/themes/faces-test-dark-theme.el  |  6 +--
 test/data/themes/faces-test-light-theme.el |  4 +-
 test/lisp/faces-tests.el                   | 70 +++++++++++++++---------------
 3 files changed, 39 insertions(+), 41 deletions(-)

diff --git a/test/data/themes/faces-test-dark-theme.el 
b/test/data/themes/faces-test-dark-theme.el
index 2c11406..f5e41cc 100644
--- a/test/data/themes/faces-test-dark-theme.el
+++ b/test/data/themes/faces-test-dark-theme.el
@@ -24,9 +24,9 @@
 
 (custom-theme-set-faces
  'faces-test-dark
- '(diff-added ((t (:foreground "Green" :extend t))))
- '(diff-changed-face ((t (:foreground "Khaki"))))
- '(diff-file-header-face ((t (:background "grey20" :foreground "ivory1")))))
+ '(spiff-added ((t (:foreground "Green" :extend t))))
+ '(spiff-changed-face ((t (:foreground "Khaki"))))
+ '(spiff-file-header-face ((t (:background "grey20" :foreground "ivory1")))))
 
 (provide-theme 'faces-test-dark)
 
diff --git a/test/data/themes/faces-test-light-theme.el 
b/test/data/themes/faces-test-light-theme.el
index fc22d47..cab4f41 100644
--- a/test/data/themes/faces-test-light-theme.el
+++ b/test/data/themes/faces-test-light-theme.el
@@ -24,8 +24,8 @@
 
 (custom-theme-set-faces
  'faces-test-light
- '(diff-added ((t (:inherit diff-changed :background "light green" :extend 
t))))
- '(diff-changed ((t (:background "light steel blue")))))
+ '(spiff-added ((t (:inherit diff-changed :background "light green" :extend 
t))))
+ '(spiff-changed ((t (:background "light steel blue")))))
 
 (provide-theme 'faces-test-light)
 
diff --git a/test/lisp/faces-tests.el b/test/lisp/faces-tests.el
index eb8c533..90604b1 100644
--- a/test/lisp/faces-tests.el
+++ b/test/lisp/faces-tests.el
@@ -108,20 +108,18 @@
   )
 
 (ert-deftest faces--test-extend-with-themes ()
-  ;; Make sure the diff-mode faces are not defined.
-  (should-not (featurep 'diff-mode))
-  (defface diff-changed-face
+  (defface spiff-changed-face
     '((t :extend t :weight bold))
     "")
-  (defface diff-added
+  (defface spiff-added
     '((t :background "grey"))
     "")
-  (defface diff-file-header-face
+  (defface spiff-file-header-face
     '((t :extend nil :foreground "cyan"))
     "")
-  (should (equal (face-attribute 'diff-changed-face :extend) t))
-  (should (equal (face-attribute 'diff-added :extend) 'unspecified))
-  (should (equal (face-attribute 'diff-file-header-face :extend) nil))
+  (should (equal (face-attribute 'spiff-changed-face :extend) t))
+  (should (equal (face-attribute 'spiff-added :extend) 'unspecified))
+  (should (equal (face-attribute 'spiff-file-header-face :extend) nil))
   (add-to-list 'custom-theme-load-path (concat faces--test-data-dir "themes"))
   (load-theme 'faces-test-dark t t)
   (load-theme 'faces-test-light t t)
@@ -132,9 +130,9 @@
                  'unspecified))
   (should (equal (face-attribute 'faces--test-inherit-no-extend :extend nil t)
                  nil))
-  (should (equal (face-attribute 'diff-changed-face :extend) t))
-  (should (equal (face-attribute 'diff-added :extend) 'unspecified))
-  (should (equal (face-attribute 'diff-file-header-face :extend) nil))
+  (should (equal (face-attribute 'spiff-changed-face :extend) t))
+  (should (equal (face-attribute 'spiff-added :extend) 'unspecified))
+  (should (equal (face-attribute 'spiff-file-header-face :extend) nil))
   (enable-theme 'faces-test-dark)
   (should (equal (face-attribute 'faces--test-inherit-extend :extend)
                  'unspecified))
@@ -143,11 +141,11 @@
                  'unspecified))
   (should (equal (face-attribute 'faces--test-inherit-no-extend :extend nil t)
                  nil))
-  (should (equal (face-attribute 'diff-changed-face :extend) t))
-  (should (equal (face-attribute 'diff-added :extend) t))
-  (should (equal (face-attribute 'diff-file-header-face :extend) nil))
+  (should (equal (face-attribute 'spiff-changed-face :extend) t))
+  (should (equal (face-attribute 'spiff-added :extend) t))
+  (should (equal (face-attribute 'spiff-file-header-face :extend) nil))
   (defface faces--test-face3
-    '((t :inherit diff-added :weight bold))
+    '((t :inherit spiff-added :weight bold))
     "")
   (should (equal (face-attribute 'faces--test-face3 :extend nil t) t))
   (disable-theme 'faces-test-dark)
@@ -158,11 +156,11 @@
                  'unspecified))
   (should (equal (face-attribute 'faces--test-inherit-no-extend :extend nil t)
                  nil))
-  (should (equal (face-attribute 'diff-changed-face :extend) t))
-  (should (equal (face-attribute 'diff-added :extend) 'unspecified))
-  (should (equal (face-attribute 'diff-file-header-face :extend) nil))
+  (should (equal (face-attribute 'spiff-changed-face :extend) t))
+  (should (equal (face-attribute 'spiff-added :extend) 'unspecified))
+  (should (equal (face-attribute 'spiff-file-header-face :extend) nil))
   (should (equal (face-attribute 'faces--test-face3 :extend nil t) 
'unspecified))
-  (defface diff-indicator-changed
+  (defface spiff-indicator-changed
     '((t (:weight bold :extend t)))
     "")
   (enable-theme 'faces-test-light)
@@ -173,10 +171,10 @@
                  'unspecified))
   (should (equal (face-attribute 'faces--test-inherit-no-extend :extend nil t)
                  nil))
-  (should (equal (face-attribute 'diff-changed-face :extend) t))
-  (should (equal (face-attribute 'diff-added :extend) t))
-  (should (equal (face-attribute 'diff-file-header-face :extend) nil))
-  (should (equal (face-attribute 'diff-indicator-changed :extend) t))
+  (should (equal (face-attribute 'spiff-changed-face :extend) t))
+  (should (equal (face-attribute 'spiff-added :extend) t))
+  (should (equal (face-attribute 'spiff-file-header-face :extend) nil))
+  (should (equal (face-attribute 'spiff-indicator-changed :extend) t))
   (should (equal (face-attribute 'faces--test-face3 :extend nil t) t))
   (frame-set-background-mode (selected-frame) 'dark)
   (should (equal (face-attribute 'faces--test-inherit-extend :extend)
@@ -186,10 +184,10 @@
                  'unspecified))
   (should (equal (face-attribute 'faces--test-inherit-no-extend :extend nil t)
                  nil))
-  (should (equal (face-attribute 'diff-changed-face :extend) t))
-  (should (equal (face-attribute 'diff-added :extend) t))
-  (should (equal (face-attribute 'diff-file-header-face :extend) nil))
-  (should (equal (face-attribute 'diff-indicator-changed :extend) t))
+  (should (equal (face-attribute 'spiff-changed-face :extend) t))
+  (should (equal (face-attribute 'spiff-added :extend) t))
+  (should (equal (face-attribute 'spiff-file-header-face :extend) nil))
+  (should (equal (face-attribute 'spiff-indicator-changed :extend) t))
   (should (equal (face-attribute 'faces--test-face3 :extend nil t) t))
   (or noninteractive
       (let ((fr (make-frame)))
@@ -203,21 +201,21 @@
         (should (equal (face-attribute 'faces--test-inherit-no-extend
                                        :extend fr t)
                        nil))
-        (should (equal (face-attribute 'diff-changed-face :extend fr) t))
-        (should (equal (face-attribute 'diff-added :extend fr) t))
-        (should (equal (face-attribute 'diff-file-header-face :extend fr) nil))
-        (should (equal (face-attribute 'diff-indicator-changed :extend fr) t))
+        (should (equal (face-attribute 'spiff-changed-face :extend fr) t))
+        (should (equal (face-attribute 'spiff-added :extend fr) t))
+        (should (equal (face-attribute 'spiff-file-header-face :extend fr) 
nil))
+        (should (equal (face-attribute 'spiff-indicator-changed :extend fr) t))
         (should (equal (face-attribute 'faces--test-face3 :extend nil t) t))
         ))
   (disable-theme 'faces-test-light)
-  (should (equal (face-attribute 'diff-indicator-changed :extend) t))
+  (should (equal (face-attribute 'spiff-indicator-changed :extend) t))
   (should (equal (face-attribute 'faces--test-face3 :extend nil t) 
'unspecified))
   (or noninteractive
       (let ((fr (make-frame)))
-        (should (equal (face-attribute 'diff-changed-face :extend fr) t))
-        (should (equal (face-attribute 'diff-added :extend fr) 'unspecified))
-        (should (equal (face-attribute 'diff-file-header-face :extend fr) nil))
-        (should (equal (face-attribute 'diff-indicator-changed :extend fr) t))
+        (should (equal (face-attribute 'spiff-changed-face :extend fr) t))
+        (should (equal (face-attribute 'spiff-added :extend fr) 'unspecified))
+        (should (equal (face-attribute 'spiff-file-header-face :extend fr) 
nil))
+        (should (equal (face-attribute 'spiff-indicator-changed :extend fr) t))
         (should (equal (face-attribute 'faces--test-face3 :extend nil t) 
'unspecified))
         ))
   )



reply via email to

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