diff options
| author | Stefan Kangas | 2020-10-24 03:45:48 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2020-10-24 13:35:49 +0200 |
| commit | 228d9d615d7067ca06a2b53205c29d78dbbfe725 (patch) | |
| tree | 0344d8c23374a8f481c9856e06497f130f0dce6c /test | |
| parent | 2c487c47c8c3060818b2fcbfebbcd859f9d06ef5 (diff) | |
| download | emacs-228d9d615d7067ca06a2b53205c29d78dbbfe725.tar.gz emacs-228d9d615d7067ca06a2b53205c29d78dbbfe725.zip | |
Move faces.el test data to follow our conventions
* test/lisp/faces-tests.el (ert-x): Require.
(faces--test-data-dir): Remove variable.
(faces--test-extend-with-themes): Use ert-resource-directory.
* test/lisp/faces-resources/*: Moved from test/data/themes/*.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/faces-resources/faces-test-dark-theme.el (renamed from test/data/themes/faces-test-dark-theme.el) | 0 | ||||
| -rw-r--r-- | test/lisp/faces-resources/faces-test-light-theme.el (renamed from test/data/themes/faces-test-light-theme.el) | 0 | ||||
| -rw-r--r-- | test/lisp/faces-tests.el | 8 |
3 files changed, 2 insertions, 6 deletions
diff --git a/test/data/themes/faces-test-dark-theme.el b/test/lisp/faces-resources/faces-test-dark-theme.el index a5e2ca43627..a5e2ca43627 100644 --- a/test/data/themes/faces-test-dark-theme.el +++ b/test/lisp/faces-resources/faces-test-dark-theme.el | |||
diff --git a/test/data/themes/faces-test-light-theme.el b/test/lisp/faces-resources/faces-test-light-theme.el index b2f7ec69742..b2f7ec69742 100644 --- a/test/data/themes/faces-test-light-theme.el +++ b/test/lisp/faces-resources/faces-test-light-theme.el | |||
diff --git a/test/lisp/faces-tests.el b/test/lisp/faces-tests.el index 32dc1eea856..b19cef5decd 100644 --- a/test/lisp/faces-tests.el +++ b/test/lisp/faces-tests.el | |||
| @@ -23,13 +23,9 @@ | |||
| 23 | ;;; Code: | 23 | ;;; Code: |
| 24 | 24 | ||
| 25 | (require 'ert) | 25 | (require 'ert) |
| 26 | (require 'ert-x) | ||
| 26 | (require 'faces) | 27 | (require 'faces) |
| 27 | 28 | ||
| 28 | (defvar faces--test-data-dir | ||
| 29 | (expand-file-name "../data/" | ||
| 30 | (file-name-directory (or load-file-name | ||
| 31 | buffer-file-name)))) | ||
| 32 | |||
| 33 | (defgroup faces--test nil "" | 29 | (defgroup faces--test nil "" |
| 34 | :group 'faces--test) | 30 | :group 'faces--test) |
| 35 | 31 | ||
| @@ -122,7 +118,7 @@ | |||
| 122 | (should (equal (face-attribute 'spiff-changed-face :extend) t)) | 118 | (should (equal (face-attribute 'spiff-changed-face :extend) t)) |
| 123 | (should (equal (face-attribute 'spiff-added :extend) 'unspecified)) | 119 | (should (equal (face-attribute 'spiff-added :extend) 'unspecified)) |
| 124 | (should (equal (face-attribute 'spiff-file-header-face :extend) nil)) | 120 | (should (equal (face-attribute 'spiff-file-header-face :extend) nil)) |
| 125 | (add-to-list 'custom-theme-load-path (concat faces--test-data-dir "themes")) | 121 | (add-to-list 'custom-theme-load-path (ert-resource-directory)) |
| 126 | (load-theme 'faces-test-dark t t) | 122 | (load-theme 'faces-test-dark t t) |
| 127 | (load-theme 'faces-test-light t t) | 123 | (load-theme 'faces-test-light t t) |
| 128 | (should (equal (face-attribute 'faces--test-inherit-extend :extend) | 124 | (should (equal (face-attribute 'faces--test-inherit-extend :extend) |