From: Eli Zaretskii Date: Tue, 11 Apr 2023 07:33:32 +0000 (+0300) Subject: Fix wallpaper-tests on MS-Windows X-Git-Tag: emacs-29.0.91~157 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c62afb10cf0bbeae6a540f4e05b7a23536636cd0;p=emacs.git Fix wallpaper-tests on MS-Windows * test/lisp/image/wallpaper-tests.el (wallpaper--find-setter) (wallpaper--find-setter/call-predicate) (wallpaper--find-setter/set-current-setter) (wallpaper-set/calls-init-action) (wallpaper-set/calls-wallpaper-set-function) (wallpaper-set/runs-command, wallpaper-set/runs-command/detach): Skip these tests if native functions are used for changing wallpaper. These tests are irrelevant in that case. --- diff --git a/test/lisp/image/wallpaper-tests.el b/test/lisp/image/wallpaper-tests.el index 94b4d8b2dbb..2e4e36030d4 100644 --- a/test/lisp/image/wallpaper-tests.el +++ b/test/lisp/image/wallpaper-tests.el @@ -24,7 +24,8 @@ (require 'wallpaper) (ert-deftest wallpaper--find-setter () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (let (wallpaper--current-setter (wallpaper--default-setters (wallpaper--default-methods-create @@ -32,7 +33,8 @@ (should (wallpaper--find-setter)))) (ert-deftest wallpaper--find-setter/call-predicate () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (let* ( wallpaper--current-setter called (wallpaper--default-setters (wallpaper--default-methods-create @@ -43,7 +45,8 @@ (should called))) (ert-deftest wallpaper--find-setter/set-current-setter () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (let (wallpaper--current-setter (wallpaper--default-setters (wallpaper--default-methods-create @@ -52,7 +55,8 @@ (should wallpaper--current-setter))) (ert-deftest wallpaper-set/runs-command () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (ert-with-temp-file fil @@ -70,7 +74,8 @@ (should (file-exists-p fil))))))) (ert-deftest wallpaper-set/runs-command/detach () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (ert-with-temp-file fil @@ -89,7 +94,8 @@ (should (file-exists-p fil)))))) (ert-deftest wallpaper-set/calls-init-action () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (ert-with-temp-file fil @@ -108,7 +114,8 @@ (should called))))) (ert-deftest wallpaper-set/calls-wallpaper-set-function () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (let* ( wallpaper--current-setter called