mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-31 01:32:00 -07:00
; Minor Tramp cleanup
* lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Do not expand remote file names w/o a localname. * test/lisp/net/tramp-tests.el (tramp--test-supports-environment-variables-p): New defun. (tramp-test33-environment-variables): Use it.
This commit is contained in:
parent
93ea0d7d28
commit
d0d657fa90
2 changed files with 8 additions and 3 deletions
|
|
@ -7406,7 +7406,8 @@ T1 and T2 are time values (as returned by `current-time' for example)."
|
||||||
Suppress `shell-file-name'. This is needed on w32 systems, which
|
Suppress `shell-file-name'. This is needed on w32 systems, which
|
||||||
would use a wrong quoting for local file names. See `w32-shell-name'."
|
would use a wrong quoting for local file names. See `w32-shell-name'."
|
||||||
(let (shell-file-name)
|
(let (shell-file-name)
|
||||||
(shell-quote-argument (file-name-unquote s))))
|
;; Do not expand remote file names w/o a localname.
|
||||||
|
(shell-quote-argument (file-name-unquote s 'top))))
|
||||||
|
|
||||||
;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
|
;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
|
||||||
;; does not deal well with newline characters. Newline is replaced by
|
;; does not deal well with newline characters. Newline is replaced by
|
||||||
|
|
|
||||||
|
|
@ -6524,8 +6524,7 @@ INPUT, if non-nil, is a string sent to the process."
|
||||||
"Check that remote processes set / unset environment variables properly."
|
"Check that remote processes set / unset environment variables properly."
|
||||||
:tags '(:expensive-test)
|
:tags '(:expensive-test)
|
||||||
(skip-unless (tramp--test-enabled))
|
(skip-unless (tramp--test-enabled))
|
||||||
(skip-unless (tramp--test-sh-p))
|
(skip-unless (tramp--test-supports-environment-variables-p))
|
||||||
(skip-unless (not (tramp--test-crypt-p)))
|
|
||||||
|
|
||||||
(dolist (this-shell-command-to-string
|
(dolist (this-shell-command-to-string
|
||||||
(append
|
(append
|
||||||
|
|
@ -7797,6 +7796,11 @@ This requires restrictions of file name syntax."
|
||||||
(tramp--test-sh-p) (tramp--test-smb-p)
|
(tramp--test-sh-p) (tramp--test-smb-p)
|
||||||
(tramp--test-sudoedit-p)))
|
(tramp--test-sudoedit-p)))
|
||||||
|
|
||||||
|
(defun tramp--test-supports-environment-variables-p ()
|
||||||
|
"Return whether setting environment variables is supported."
|
||||||
|
(and (tramp--test-sh-p)
|
||||||
|
(not (tramp--test-crypt-p))))
|
||||||
|
|
||||||
(defun tramp--test-check-files (&rest files)
|
(defun tramp--test-check-files (&rest files)
|
||||||
"Run a simple but comprehensive test over every file in FILES."
|
"Run a simple but comprehensive test over every file in FILES."
|
||||||
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
|
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue