summaryrefslogtreecommitdiff
path: root/test/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2021-11-15 17:50:15 +0100
committerMichael Albinus <michael.albinus@gmx.de>2021-11-15 17:50:15 +0100
commit5b250ca79b9aeeeea0b521db9645882240f08c9f (patch)
treed1f3ae462fb3f57b0379a905e784ad6a07bd7f7d /test/lisp/net
parent83023117de77c3c41286b0eeb56e2e5417080c43 (diff)
downloademacs-5b250ca79b9aeeeea0b521db9645882240f08c9f.tar.gz
emacs-5b250ca79b9aeeeea0b521db9645882240f08c9f.tar.bz2
emacs-5b250ca79b9aeeeea0b521db9645882240f08c9f.zip
Fix minor problems resulting from Tramp regression tests
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add comment. * lisp/net/tramp-cache.el (tramp-flush-file-upper-properties): FILE can be "~". * lisp/net/tramp.el ('tramp-ensure-dissected-file-name): Add `tramp-suppress-trace' property. (tramp-get-debug-buffer): Add local key for debugging. (tramp-handle-abbreviate-file-name): Adapt implementation. * test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name): Adapt test. (tramp-test17-insert-directory-one-file) (tramp--test-check-files): Use proper `no-dir' argument for `dired-get-filename'.
Diffstat (limited to 'test/lisp/net')
-rw-r--r--test/lisp/net/tramp-tests.el24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 698d18b5282..150ea29838c 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2297,11 +2297,13 @@ This checks also `file-name-as-directory', `file-name-directory',
(let* ((remote-host (file-remote-p tramp-test-temporary-file-directory))
(home-dir (expand-file-name (concat remote-host "~"))))
;; Check home-dir abbreviation.
- (should (equal (abbreviate-file-name (concat home-dir "/foo/bar"))
- (concat remote-host "~/foo/bar")))
- (should (equal (abbreviate-file-name (concat remote-host
- "/nowhere/special"))
- (concat remote-host "/nowhere/special")))
+ (unless (string-suffix-p "~" home-dir)
+ (should (equal (abbreviate-file-name (concat home-dir "/foo/bar"))
+ (concat remote-host "~/foo/bar")))
+ (should (equal (abbreviate-file-name
+ (concat remote-host "/nowhere/special"))
+ (concat remote-host "/nowhere/special"))))
+
;; Check `directory-abbrev-alist' abbreviation.
(let ((directory-abbrev-alist
`((,(concat "\\`" (regexp-quote home-dir) "/foo")
@@ -2310,8 +2312,8 @@ This checks also `file-name-as-directory', `file-name-directory',
. ,(concat remote-host "/nw")))))
(should (equal (abbreviate-file-name (concat home-dir "/foo/bar"))
(concat remote-host "~/f/bar")))
- (should (equal (abbreviate-file-name (concat remote-host
- "/nowhere/special"))
+ (should (equal (abbreviate-file-name
+ (concat remote-host "/nowhere/special"))
(concat remote-host "/nw/special"))))))
(ert-deftest tramp-test07-file-exists-p ()
@@ -3327,7 +3329,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
(goto-char (point-min))
(while (not (or (eobp)
(string-equal
- (dired-get-filename 'localp 'no-error)
+ (dired-get-filename 'no-dir 'no-error)
(file-name-nondirectory tmp-name2))))
(forward-line 1))
(should-not (eobp))
@@ -3337,14 +3339,14 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
;; Point shall still be the recent file.
(should
(string-equal
- (dired-get-filename 'localp 'no-error)
+ (dired-get-filename 'no-dir 'no-error)
(file-name-nondirectory tmp-name2)))
(should-not (re-search-forward "dired" nil t))
;; The copied file has been inserted the line before.
(forward-line -1)
(should
(string-equal
- (dired-get-filename 'localp 'no-error)
+ (dired-get-filename 'no-dir 'no-error)
(file-name-nondirectory tmp-name3))))
(kill-buffer buffer))
@@ -6329,7 +6331,7 @@ This requires restrictions of file name syntax."
(setq buffer (dired-noselect tmp-name1 "--dired -al"))
(goto-char (point-min))
(while (not (eobp))
- (when-let ((name (dired-get-filename 'localp 'no-error)))
+ (when-let ((name (dired-get-filename 'no-dir 'no-error)))
(unless
(string-match-p name directory-files-no-dot-files-regexp)
(should (member name files))))