Skip to content

Commit 3ff7d73

Browse files
committed
Adapt tramp-test32-shell-command
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Check "tput" before running `shell-command-width' test.
1 parent f5e3c2c commit 3ff7d73

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/lisp/net/tramp-tests.el

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4193,16 +4193,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
41934193
(ignore-errors (delete-file tmp-name)))
41944194

41954195
;; Test `shell-command-width' of `async-shell-command'.
4196-
;; `executable-find' has changed the number of parameters in
4197-
;; Emacs 27.1, so we use `apply' for older Emacsen.
4198-
(when (and (executable-find "tput")
4199-
(apply #'executable-find '("tput" 'remote)))
4196+
(when (and (zerop (call-process "tput" nil nil nil "cols"))
4197+
(zerop (process-file "tput" nil nil nil "cols")))
42004198
(let (shell-command-width)
42014199
(should
42024200
(string-equal
4203-
;; `frame-width' does not return a proper value.
4204-
;; `process-lines' uses `call-process', it doesn't care
4205-
;; about `shell-command-width'.
42064201
(format "%s\n" (car (process-lines "tput" "cols")))
42074202
(tramp--test-shell-command-to-string-asynchronously
42084203
"tput cols")))

0 commit comments

Comments
 (0)