diff options
| author | Eli Zaretskii | 2023-04-11 10:33:32 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-04-11 10:33:32 +0300 |
| commit | c62afb10cf0bbeae6a540f4e05b7a23536636cd0 (patch) | |
| tree | 3656258b3ec3eed1f8a7f426aabf2fdfe8432596 | |
| parent | f2d212c696692879254b7fc7ca2a9b0a2999e557 (diff) | |
| download | emacs-c62afb10cf0bbeae6a540f4e05b7a23536636cd0.tar.gz emacs-c62afb10cf0bbeae6a540f4e05b7a23536636cd0.zip | |
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.
| -rw-r--r-- | test/lisp/image/wallpaper-tests.el | 21 |
1 files changed, 14 insertions, 7 deletions
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 @@ | |||
| 24 | (require 'wallpaper) | 24 | (require 'wallpaper) |
| 25 | 25 | ||
| 26 | (ert-deftest wallpaper--find-setter () | 26 | (ert-deftest wallpaper--find-setter () |
| 27 | (skip-unless (executable-find "touch")) | 27 | (skip-unless (and (executable-find "touch") |
| 28 | (wallpaper--use-default-set-function-p))) | ||
| 28 | (let (wallpaper--current-setter | 29 | (let (wallpaper--current-setter |
| 29 | (wallpaper--default-setters | 30 | (wallpaper--default-setters |
| 30 | (wallpaper--default-methods-create | 31 | (wallpaper--default-methods-create |
| @@ -32,7 +33,8 @@ | |||
| 32 | (should (wallpaper--find-setter)))) | 33 | (should (wallpaper--find-setter)))) |
| 33 | 34 | ||
| 34 | (ert-deftest wallpaper--find-setter/call-predicate () | 35 | (ert-deftest wallpaper--find-setter/call-predicate () |
| 35 | (skip-unless (executable-find "touch")) | 36 | (skip-unless (and (executable-find "touch") |
| 37 | (wallpaper--use-default-set-function-p))) | ||
| 36 | (let* ( wallpaper--current-setter called | 38 | (let* ( wallpaper--current-setter called |
| 37 | (wallpaper--default-setters | 39 | (wallpaper--default-setters |
| 38 | (wallpaper--default-methods-create | 40 | (wallpaper--default-methods-create |
| @@ -43,7 +45,8 @@ | |||
| 43 | (should called))) | 45 | (should called))) |
| 44 | 46 | ||
| 45 | (ert-deftest wallpaper--find-setter/set-current-setter () | 47 | (ert-deftest wallpaper--find-setter/set-current-setter () |
| 46 | (skip-unless (executable-find "touch")) | 48 | (skip-unless (and (executable-find "touch") |
| 49 | (wallpaper--use-default-set-function-p))) | ||
| 47 | (let (wallpaper--current-setter | 50 | (let (wallpaper--current-setter |
| 48 | (wallpaper--default-setters | 51 | (wallpaper--default-setters |
| 49 | (wallpaper--default-methods-create | 52 | (wallpaper--default-methods-create |
| @@ -52,7 +55,8 @@ | |||
| 52 | (should wallpaper--current-setter))) | 55 | (should wallpaper--current-setter))) |
| 53 | 56 | ||
| 54 | (ert-deftest wallpaper-set/runs-command () | 57 | (ert-deftest wallpaper-set/runs-command () |
| 55 | (skip-unless (executable-find "touch")) | 58 | (skip-unless (and (executable-find "touch") |
| 59 | (wallpaper--use-default-set-function-p))) | ||
| 56 | (ert-with-temp-file fil-jpg | 60 | (ert-with-temp-file fil-jpg |
| 57 | :suffix ".jpg" | 61 | :suffix ".jpg" |
| 58 | (ert-with-temp-file fil | 62 | (ert-with-temp-file fil |
| @@ -70,7 +74,8 @@ | |||
| 70 | (should (file-exists-p fil))))))) | 74 | (should (file-exists-p fil))))))) |
| 71 | 75 | ||
| 72 | (ert-deftest wallpaper-set/runs-command/detach () | 76 | (ert-deftest wallpaper-set/runs-command/detach () |
| 73 | (skip-unless (executable-find "touch")) | 77 | (skip-unless (and (executable-find "touch") |
| 78 | (wallpaper--use-default-set-function-p))) | ||
| 74 | (ert-with-temp-file fil-jpg | 79 | (ert-with-temp-file fil-jpg |
| 75 | :suffix ".jpg" | 80 | :suffix ".jpg" |
| 76 | (ert-with-temp-file fil | 81 | (ert-with-temp-file fil |
| @@ -89,7 +94,8 @@ | |||
| 89 | (should (file-exists-p fil)))))) | 94 | (should (file-exists-p fil)))))) |
| 90 | 95 | ||
| 91 | (ert-deftest wallpaper-set/calls-init-action () | 96 | (ert-deftest wallpaper-set/calls-init-action () |
| 92 | (skip-unless (executable-find "touch")) | 97 | (skip-unless (and (executable-find "touch") |
| 98 | (wallpaper--use-default-set-function-p))) | ||
| 93 | (ert-with-temp-file fil-jpg | 99 | (ert-with-temp-file fil-jpg |
| 94 | :suffix ".jpg" | 100 | :suffix ".jpg" |
| 95 | (ert-with-temp-file fil | 101 | (ert-with-temp-file fil |
| @@ -108,7 +114,8 @@ | |||
| 108 | (should called))))) | 114 | (should called))))) |
| 109 | 115 | ||
| 110 | (ert-deftest wallpaper-set/calls-wallpaper-set-function () | 116 | (ert-deftest wallpaper-set/calls-wallpaper-set-function () |
| 111 | (skip-unless (executable-find "touch")) | 117 | (skip-unless (and (executable-find "touch") |
| 118 | (wallpaper--use-default-set-function-p))) | ||
| 112 | (ert-with-temp-file fil-jpg | 119 | (ert-with-temp-file fil-jpg |
| 113 | :suffix ".jpg" | 120 | :suffix ".jpg" |
| 114 | (let* ( wallpaper--current-setter called | 121 | (let* ( wallpaper--current-setter called |