emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master a99a354: ; Instrument `tramp--test-shell-command-to


From: Michael Albinus
Subject: [Emacs-diffs] master a99a354: ; Instrument `tramp--test-shell-command-to-string-asynchronously'
Date: Thu, 18 Apr 2019 15:47:43 -0400 (EDT)

branch: master
commit a99a3542f3ae6c17af033c17f03a45a1def75e8f
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    ; Instrument `tramp--test-shell-command-to-string-asynchronously'
---
 test/lisp/net/tramp-tests.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 926bf33..f228c5c 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -4085,11 +4085,15 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
 (defun tramp--test-shell-command-to-string-asynchronously (command)
   "Like `shell-command-to-string', but for asynchronous processes."
   (with-temp-buffer
-    (async-shell-command command (current-buffer))
-    (with-timeout
-        ((if (getenv "EMACS_EMBA_CI") 30 10) (tramp--test-timeout-handler))
-      (while (accept-process-output
-             (get-buffer-process (current-buffer)) nil nil t)))
+    (unwind-protect
+        (async-shell-command command (current-buffer))
+      (with-timeout
+          ((if (getenv "EMACS_EMBA_CI") 30 10) (tramp--test-timeout-handler))
+        (while (accept-process-output
+               (get-buffer-process (current-buffer)) nil nil t)))
+      (tramp--test-message
+       "# %s\n%s"
+       command (buffer-substring-no-properties (point-min) (point-max))))
     (buffer-substring-no-properties (point-min) (point-max))))
 
 (ert-deftest tramp-test32-shell-command ()
@@ -4189,7 +4193,6 @@ 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]