]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix wallpaper-tests on XFCE
authorEli Zaretskii <eliz@gnu.org>
Tue, 11 Apr 2023 14:47:48 +0000 (17:47 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 11 Apr 2023 14:47:48 +0000 (17:47 +0300)
* test/lisp/image/wallpaper-tests.el
(wallpaper--find-command-args/return-list): Account for
command-args being a function.  (Bug#62673)

test/lisp/image/wallpaper-tests.el

index 2e4e36030d4f98b093a347d854f070efdcda30f7..c4167adbef231fa395531500c10a38589afd905d 100644 (file)
       (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))))