[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3d58ea1: Small adaptions for directory wildcards
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 3d58ea1: Small adaptions for directory wildcards |
Date: |
Mon, 31 Jul 2017 08:32:33 -0400 (EDT) |
branch: master
commit 3d58ea1c0ba821a4d6915d6beeaa1617d4ad606f
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Small adaptions for directory wildcards
* lisp/dired.el (dired-insert-directory): Remove "--dired"
when there are wildcards, and the directory is remote.
* test/lisp/net/tramp-tests.el (tramp--test-make-temp-name):
Adapt docstring.
(tramp-test17-dired-with-wildcards): Skip for all methods but
those from tamp-sh.p.
---
lisp/dired.el | 5 +++++
test/lisp/net/tramp-tests.el | 15 ++++++++++-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/lisp/dired.el b/lisp/dired.el
index ca00578..c502dd8 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1228,6 +1228,11 @@ see `dired-use-ls-dired' for more details.")
(let ((dir-wildcard (insert-directory-wildcard-in-dir-p dir)))
(cond (dir-wildcard
(setq switches (concat "-d " switches))
+ ;; We don't know whether the remote ls supports
+ ;; "--dired", so we cannot add it to the `process-file'
+ ;; call for wildcards.
+ (when (file-remote-p dir)
+ (setq switches (dired-replace-in-string "--dired" "" switches)))
(let ((default-directory (car dir-wildcard))
(script (format "ls %s %s" switches (cdr dir-wildcard))))
(unless
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 3e28eb6..d766290 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -123,9 +123,10 @@ being the result.")
(cdr tramp--test-enabled-checked))
(defun tramp--test-make-temp-name (&optional local quoted)
- "Create a temporary file name for test.
-If LOCAL is non-nil, a local file is created.
-If QUOTED is non-nil, the local part of the file is quoted."
+ "Return a temporary file name for test.
+If LOCAL is non-nil, a local file name is returned.
+If QUOTED is non-nil, the local part of the file name is quoted.
+The temporary file is not created."
(funcall
(if quoted 'tramp-compat-file-name-quote 'identity)
(expand-file-name
@@ -2204,6 +2205,8 @@ This tests also `file-directory-p' and
`file-accessible-directory-p'."
(ert-deftest tramp-test17-dired-with-wildcards ()
"Check `dired' with wildcards."
(skip-unless (tramp--test-enabled))
+ (skip-unless (tramp--test-sh-p))
+ ;; Since Emacs 26.1.
(skip-unless (fboundp 'insert-directory-wildcard-in-dir-p))
(dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil)))
@@ -3107,6 +3110,7 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
:tags '(:expensive-test)
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
+ ;; Since Emacs 26.1.
(skip-unless (and (fboundp 'connection-local-set-profile-variables)
(fboundp 'connection-local-set-profiles)))
@@ -3316,6 +3320,7 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
(ert-deftest tramp-test33-make-nearby-temp-file ()
"Check `make-nearby-temp-file' and `temporary-file-directory'."
(skip-unless (tramp--test-enabled))
+ ;; Since Emacs 26.1.
(skip-unless
(and (fboundp 'make-nearby-temp-file) (fboundp 'temporary-file-directory)))
@@ -3902,7 +3907,7 @@ process sentinels. They shall not disturb each other."
(count (process-get proc 'bar)))
(tramp--test-message
"Start action %d %s %s" count buf (current-time-string))
- ;; Regular operation.
+ ;; Regular operation prior process action.
(if (= count 0)
(should-not (file-attributes file))
(should (file-attributes file)))
@@ -3911,7 +3916,7 @@ process sentinels. They shall not disturb each other."
(accept-process-output proc 0.1 nil 0)
;; Give the watchdog a chance.
(read-event nil nil 0.01)
- ;; Regular operation.
+ ;; Regular operation post process action.
(tramp--test-instrument-test-case 10
(if (= count 2)
(should-not (file-attributes file))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3d58ea1: Small adaptions for directory wildcards,
Michael Albinus <=