aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Kangas2022-10-19 16:15:02 +0200
committerStefan Kangas2022-10-19 16:20:02 +0200
commitb96f441139e09d48880e1f20ad4237400529ac5f (patch)
treed90fea0776e39c6627b3221c7eb44e3733cbd460 /test
parent6b82958b9fad5fcf784cf93e44dc118cf554d927 (diff)
downloademacs-b96f441139e09d48880e1f20ad4237400529ac5f.tar.gz
emacs-b96f441139e09d48880e1f20ad4237400529ac5f.zip
; Delete file after wallpaper test
* test/lisp/image/wallpaper-tests.el (wallpaper-set/calls-init-action): Don't leave temp file behind.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/image/wallpaper-tests.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/lisp/image/wallpaper-tests.el b/test/lisp/image/wallpaper-tests.el
index cb6818f8c1b..ab980a11bb6 100644
--- a/test/lisp/image/wallpaper-tests.el
+++ b/test/lisp/image/wallpaper-tests.el
@@ -99,9 +99,16 @@
99 ("touch" "touch" fil 99 ("touch" "touch" fil
100 :init-action (lambda () (setq called t))))) 100 :init-action (lambda () (setq called t)))))
101 (wallpaper-command (wallpaper--find-command)) 101 (wallpaper-command (wallpaper--find-command))
102 (wallpaper-command-args (wallpaper--find-command-args))) 102 (wallpaper-command-args (wallpaper--find-command-args))
103 (start (time-convert nil 'integer))
104 (timeout 3) process)
103 (should (functionp (wallpaper-setter-init-action wallpaper--current-setter))) 105 (should (functionp (wallpaper-setter-init-action wallpaper--current-setter)))
104 (wallpaper-set fil-jpg) 106 (setq process (wallpaper-set fil-jpg))
107 ;; Wait for "touch" process to exit so temp file is removed.
108 (while (and (< (- (time-convert nil 'integer) start)
109 timeout)
110 (process-live-p process))
111 (sit-for 0.01))
105 (should called))))) 112 (should called)))))
106 113
107(ert-deftest wallpaper-set/calls-wallpaper-set-function () 114(ert-deftest wallpaper-set/calls-wallpaper-set-function ()