[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b96f441139: ; Delete file after wallpaper test
From: |
Stefan Kangas |
Subject: |
master b96f441139: ; Delete file after wallpaper test |
Date: |
Wed, 19 Oct 2022 10:20:11 -0400 (EDT) |
branch: master
commit b96f441139e09d48880e1f20ad4237400529ac5f
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
; Delete file after wallpaper test
* test/lisp/image/wallpaper-tests.el
(wallpaper-set/calls-init-action): Don't leave temp file behind.
---
test/lisp/image/wallpaper-tests.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/test/lisp/image/wallpaper-tests.el
b/test/lisp/image/wallpaper-tests.el
index cb6818f8c1..ab980a11bb 100644
--- a/test/lisp/image/wallpaper-tests.el
+++ b/test/lisp/image/wallpaper-tests.el
@@ -99,9 +99,16 @@
("touch" "touch" fil
:init-action (lambda () (setq called t)))))
(wallpaper-command (wallpaper--find-command))
- (wallpaper-command-args (wallpaper--find-command-args)))
+ (wallpaper-command-args (wallpaper--find-command-args))
+ (start (time-convert nil 'integer))
+ (timeout 3) process)
(should (functionp (wallpaper-setter-init-action
wallpaper--current-setter)))
- (wallpaper-set fil-jpg)
+ (setq process (wallpaper-set fil-jpg))
+ ;; Wait for "touch" process to exit so temp file is removed.
+ (while (and (< (- (time-convert nil 'integer) start)
+ timeout)
+ (process-live-p process))
+ (sit-for 0.01))
(should called)))))
(ert-deftest wallpaper-set/calls-wallpaper-set-function ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b96f441139: ; Delete file after wallpaper test,
Stefan Kangas <=