From: Eli Zaretskii Date: Tue, 11 Apr 2023 14:47:48 +0000 (+0300) Subject: ; Fix wallpaper-tests on XFCE X-Git-Tag: emacs-29.0.91~152 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=372e024accd9b6e96c2dd92f89451192fb06b509;p=emacs.git ; Fix wallpaper-tests on XFCE * test/lisp/image/wallpaper-tests.el (wallpaper--find-command-args/return-list): Account for command-args being a function. (Bug#62673) --- diff --git a/test/lisp/image/wallpaper-tests.el b/test/lisp/image/wallpaper-tests.el index 2e4e36030d4..c4167adbef2 100644 --- a/test/lisp/image/wallpaper-tests.el +++ b/test/lisp/image/wallpaper-tests.el @@ -129,12 +129,16 @@ (should (equal called fil-jpg))))) (ert-deftest wallpaper--find-command/return-string () - (should (or (not (wallpaper--find-command)) - (stringp (wallpaper--find-command))))) + (let ((cmd (wallpaper--find-command))) + (should (or (not cmd) + (stringp cmd))))) (ert-deftest wallpaper--find-command-args/return-list () - (should (or (not (wallpaper--find-command-args)) - (listp (wallpaper--find-command-args))))) + (let ((cmdargs (wallpaper--find-command-args))) + (if (functionp cmdargs) + (setq cmdargs (funcall cmdargs))) + (should (or (not cmdargs) + (listp cmdargs))))) (ert-deftest wallpaper--image-file-regexp/return-string () (should (stringp (wallpaper--image-file-regexp))))