aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2019-04-19 11:30:22 +0200
committerMichael Albinus2019-04-19 11:30:22 +0200
commit3ff7d7321ac62b1eb896e8a032e7f75f5a6b8146 (patch)
tree893ce3c7acb8d9666c2ec0a87e7b2d4540cdfa72 /test
parentf5e3c2cc9820a4f7f536a29836cdde6f65230bd3 (diff)
downloademacs-3ff7d7321ac62b1eb896e8a032e7f75f5a6b8146.tar.gz
emacs-3ff7d7321ac62b1eb896e8a032e7f75f5a6b8146.zip
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.el9
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'."
4193 (ignore-errors (delete-file tmp-name))) 4193 (ignore-errors (delete-file tmp-name)))
4194 4194
4195 ;; Test `shell-command-width' of `async-shell-command'. 4195 ;; Test `shell-command-width' of `async-shell-command'.
4196 ;; `executable-find' has changed the number of parameters in 4196 (when (and (zerop (call-process "tput" nil nil nil "cols"))
4197 ;; Emacs 27.1, so we use `apply' for older Emacsen. 4197 (zerop (process-file "tput" nil nil nil "cols")))
4198 (when (and (executable-find "tput")
4199 (apply #'executable-find '("tput" 'remote)))
4200 (let (shell-command-width) 4198 (let (shell-command-width)
4201 (should 4199 (should
4202 (string-equal 4200 (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'.
4206 (format "%s\n" (car (process-lines "tput" "cols"))) 4201 (format "%s\n" (car (process-lines "tput" "cols")))
4207 (tramp--test-shell-command-to-string-asynchronously 4202 (tramp--test-shell-command-to-string-asynchronously
4208 "tput cols"))) 4203 "tput cols")))