diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2019-04-19 11:30:22 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2019-04-19 11:30:22 +0200 |
commit | 3ff7d7321ac62b1eb896e8a032e7f75f5a6b8146 (patch) | |
tree | 893ce3c7acb8d9666c2ec0a87e7b2d4540cdfa72 /test | |
parent | f5e3c2cc9820a4f7f536a29836cdde6f65230bd3 (diff) | |
download | emacs-3ff7d7321ac62b1eb896e8a032e7f75f5a6b8146.tar.gz |
Adapt tramp-test32-shell-command
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Check "tput" before running `shell-command-width' test.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/net/tramp-tests.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index f228c5c5a8d..cadb282aecf 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4193,16 +4193,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (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"))) |