From 228d9d615d7067ca06a2b53205c29d78dbbfe725 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 24 Oct 2020 03:45:48 +0200 Subject: [PATCH] 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/*. --- .../faces-resources}/faces-test-dark-theme.el | 0 .../faces-resources}/faces-test-light-theme.el | 0 test/lisp/faces-tests.el | 8 ++------ 3 files changed, 2 insertions(+), 6 deletions(-) rename test/{data/themes => lisp/faces-resources}/faces-test-dark-theme.el (100%) rename test/{data/themes => lisp/faces-resources}/faces-test-light-theme.el (100%) diff --git a/test/data/themes/faces-test-dark-theme.el b/test/lisp/faces-resources/faces-test-dark-theme.el similarity index 100% rename from test/data/themes/faces-test-dark-theme.el rename to 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 similarity index 100% rename from test/data/themes/faces-test-light-theme.el rename to 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 @@ ;;; Code: (require 'ert) +(require 'ert-x) (require 'faces) -(defvar faces--test-data-dir - (expand-file-name "../data/" - (file-name-directory (or load-file-name - buffer-file-name)))) - (defgroup faces--test nil "" :group 'faces--test) @@ -122,7 +118,7 @@ (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")) + (add-to-list 'custom-theme-load-path (ert-resource-directory)) (load-theme 'faces-test-dark t t) (load-theme 'faces-test-light t t) (should (equal (face-attribute 'faces--test-inherit-extend :extend) -- 2.39.2