(ignore-errors (delete-file tmp-name)))
;; Test `shell-command-width' of `async-shell-command'.
- ;; `executable-find' has changed the number of parameters in
- ;; Emacs 27.1, so we use `apply' for older Emacsen.
- (when (and (executable-find "tput")
- (apply #'executable-find '("tput" 'remote)))
+ (when (and (zerop (call-process "tput" nil nil nil "cols"))
+ (zerop (process-file "tput" nil nil nil "cols")))
(let (shell-command-width)
(should
(string-equal
- ;; `frame-width' does not return a proper value.
- ;; `process-lines' uses `call-process', it doesn't care
- ;; about `shell-command-width'.
(format "%s\n" (car (process-lines "tput" "cols")))
(tramp--test-shell-command-to-string-asynchronously
"tput cols")))