summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/dired-aux-tests.el13
-rw-r--r--test/lisp/dired-x-tests.el13
2 files changed, 13 insertions, 13 deletions
diff --git a/test/lisp/dired-aux-tests.el b/test/lisp/dired-aux-tests.el
index 694deaae4c2..e70898ab74e 100644
--- a/test/lisp/dired-aux-tests.el
+++ b/test/lisp/dired-aux-tests.el
@@ -154,5 +154,18 @@
(should (string-match (regexp-quote command) (nth 0 lines)))
(dired-test--check-highlighting (nth 0 lines) '(8))))
+(ert-deftest dired-guess-default ()
+ (let ((dired-guess-shell-alist-user nil)
+ (dired-guess-shell-alist-default
+ '(("\\.png\\'" "display")
+ ("\\.gif\\'" "display" "xloadimage")
+ ("\\.gif\\'" "feh")
+ ("\\.jpe?g\\'" "xloadimage"))))
+ (should (equal (dired-guess-default '("/tmp/foo.png")) "display"))
+ (should (equal (dired-guess-default '("/tmp/foo.gif"))
+ '("display" "xloadimage" "feh")))
+ (should (equal (dired-guess-default '("/tmp/foo.png" "/tmp/foo.txt"))
+ nil))))
+
(provide 'dired-aux-tests)
;;; dired-aux-tests.el ends here
diff --git a/test/lisp/dired-x-tests.el b/test/lisp/dired-x-tests.el
index cec266b0ef9..7acaa3c1319 100644
--- a/test/lisp/dired-x-tests.el
+++ b/test/lisp/dired-x-tests.el
@@ -47,19 +47,6 @@
(should (equal all-but-c
(sort (dired-get-marked-files 'local) #'string<))))))
-(ert-deftest dired-guess-default ()
- (let ((dired-guess-shell-alist-user nil)
- (dired-guess-shell-alist-default
- '(("\\.png\\'" "display")
- ("\\.gif\\'" "display" "xloadimage")
- ("\\.gif\\'" "feh")
- ("\\.jpe?g\\'" "xloadimage"))))
- (should (equal (dired-guess-default '("/tmp/foo.png")) "display"))
- (should (equal (dired-guess-default '("/tmp/foo.gif"))
- '("display" "xloadimage" "feh")))
- (should (equal (dired-guess-default '("/tmp/foo.png" "/tmp/foo.txt"))
- nil))))
-
(ert-deftest dired-x--string-to-number ()
(should (= (dired-x--string-to-number "2.4K") 2457.6))
(should (= (dired-x--string-to-number "2400") 2400))