]> git.eshelyaron.com Git - emacs.git/commitdiff
Adapt tramp-test32-shell-command
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 19 Apr 2019 09:30:22 +0000 (11:30 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 19 Apr 2019 09:30:22 +0000 (11:30 +0200)
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Check "tput" before running `shell-command-width' test.

test/lisp/net/tramp-tests.el

index f228c5c5a8d656488f65b8c22f801a65057e3e80..cadb282aecf0326de9c19b3ea66762fea188a123 100644 (file)
@@ -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")))