]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename faces used in faces-tests.el
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 10 Dec 2019 00:15:55 +0000 (02:15 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 10 Dec 2019 00:16:44 +0000 (02:16 +0200)
* 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
test/data/themes/faces-test-light-theme.el
test/lisp/faces-tests.el

index 2c114069f9cc2072fde4c2a628a4b2d9b4ff7347..f5e41ccdaf949fef228044bf2e50d2a415ba90fe 100644 (file)
@@ -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)
 
index fc22d47cf8d6d7daf36da66979169cf2029d37ce..cab4f4130b7f562d2f15b7a532424fb420a3ebc5 100644 (file)
@@ -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)
 
index eb8c533b8e63f37105af157a5fbadc7f019b6acc..90604b1269e50a89138dee280483223ed5454f2c 100644 (file)
   )
 
 (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)
                  '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))
                  '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)
                  '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)
                  '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)
                  '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)))
         (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))
         ))
   )