aboutsummaryrefslogtreecommitdiff
path: root/tests/test-dirvish-config-wrappers.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-dirvish-config-wrappers.el')
-rw-r--r--tests/test-dirvish-config-wrappers.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-dirvish-config-wrappers.el b/tests/test-dirvish-config-wrappers.el
index 7072fcf7..bead4583 100644
--- a/tests/test-dirvish-config-wrappers.el
+++ b/tests/test-dirvish-config-wrappers.el
@@ -140,5 +140,11 @@ calls the wallpaper-setter binary."
(should (member "/some/picture.jpg" call-process-args))
(should (string-match-p "Wallpaper set" msg))))
+(ert-deftest test-dirvish-set-wallpaper-no-file-errors ()
+ "Error: with no file at point, set-wallpaper signals user-error rather
+than passing nil to expand-file-name."
+ (cl-letf (((symbol-function 'dired-file-name-at-point) (lambda () nil)))
+ (should-error (cj/set-wallpaper) :type 'user-error)))
+
(provide 'test-dirvish-config-wrappers)
;;; test-dirvish-config-wrappers.el ends here