forked from ncaq/recentf-remove-sudo-tramp-prefix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecentf-remove-sudo-tramp-prefix-test.el
44 lines (35 loc) · 1.68 KB
/
recentf-remove-sudo-tramp-prefix-test.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;; -*- lexical-binding: t -*-
(require 'recentf-remove-sudo-tramp-prefix)
(ert-deftest recentf-remove-sudo-tramp-prefix-remove-sudo:user ()
(should (equal
(recentf-remove-sudo-tramp-prefix-remove-sudo "~/.gitconfig")
"~/.gitconfig"
)))
(ert-deftest recentf-remove-sudo-tramp-prefix-remove-sudo:scp ()
(should (equal
(recentf-remove-sudo-tramp-prefix-remove-sudo "/scp:root@sonoda:/etc/systemd/system.conf")
"/scp:root@sonoda:/etc/systemd/system.conf"
)))
(ert-deftest recentf-remove-sudo-tramp-prefix-remove-sudo:sudo ()
(should (equal
(recentf-remove-sudo-tramp-prefix-remove-sudo
"/sudo:[email protected]:/usr/share/emacs/24.5/lisp/net/tramp.el")
"/usr/share/emacs/24.5/lisp/net/tramp.el"
)))
(ert-deftest recentf-remove-sudo-tramp-prefix-remove-sudo:sudo-short ()
(should-not (equal
(recentf-remove-sudo-tramp-prefix-remove-sudo
"/sudo:root@akaza:/usr/share/emacs/24.5/lisp/net/tramp.el")
"/usr/share/emacs/24.5/lisp/net/tramp.el"
)))
(ert-deftest recentf-remove-sudo-tramp-prefix-remove-sudo:sudo-properties ()
(should (equal
(recentf-remove-sudo-tramp-prefix-remove-sudo
#("/sudo:[email protected]:/usr/share/emacs/24.5/lisp/net/tramp.el"
6 10 (tramp-default t)))
"/usr/share/emacs/24.5/lisp/net/tramp.el"
)))
(ert-deftest recentf-remove-sudo-tramp-prefix-remove-sudo:recentf-list ()
(should (mapc 'recentf-remove-sudo-tramp-prefix-remove-sudo recentf-list)))
(ert-run-tests-interactively t)
(provide 'recentf-remove-sudo-tramp-prefix-test)