Commit bbe13596 authored by Michael Albinus's avatar Michael Albinus

Fix Tramp tests for MS Windows

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Improve for MS-Windows.
parent b80c4b43
Pipeline #4790 passed with stage
in 54 minutes and 52 seconds
......@@ -4194,7 +4194,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(setq proc (start-file-process "test1" (current-buffer) "cat"))
(should (processp proc))
(should (equal (process-status proc) 'run))
(process-send-string proc "foo")
(process-send-string proc "foo\n")
(process-send-eof proc)
;; Read output.
(with-timeout (10 (tramp--test-timeout-handler))
......@@ -4237,7 +4237,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(set-process-filter
proc
(lambda (p s) (with-current-buffer (process-buffer p) (insert s))))
(process-send-string proc "foo")
(process-send-string proc "foo\n")
(process-send-eof proc)
;; Read output.
(with-timeout (10 (tramp--test-timeout-handler))
......@@ -4275,7 +4275,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
:file-handler t)))
(should (processp proc))
(should (equal (process-status proc) 'run))
(process-send-string proc "foo")
(process-send-string proc "foo\n")
(process-send-eof proc)
;; Read output.
(with-timeout (10 (tramp--test-timeout-handler))
......@@ -4324,7 +4324,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
:file-handler t)))
(should (processp proc))
(should (equal (process-status proc) 'run))
(process-send-string proc "foo")
(process-send-string proc "foo\n")
(process-send-eof proc)
;; Read output.
(with-timeout (10 (tramp--test-timeout-handler))
......@@ -4350,7 +4350,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
:file-handler t)))
(should (processp proc))
(should (equal (process-status proc) 'run))
(process-send-string proc "foo")
(process-send-string proc "foo\n")
(process-send-eof proc)
(delete-process proc)
;; Read output.
......@@ -4358,8 +4358,13 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(while (accept-process-output proc 0 nil t)))
;; We cannot use `string-equal', because tramp-adb.el
;; echoes also the sent string. And a remote macOS sends
;; a slightly modified string.
(should (string-match "killed.*\n\\'" (buffer-string))))
;; a slightly modified string. On MS-Windows,
;; `delete-process' sends an unknown signal.
(should
(string-match
(if (eq system-type 'windows-nt)
"unknown signal\n\\'" "killed.*\n\\'")
(buffer-string))))
;; Cleanup.
(ignore-errors (delete-process proc)))
......@@ -6302,9 +6307,7 @@ If INTERACTIVE is non-nil, the tests are run interactively."
;; * Fix `tramp-test06-directory-file-name' for `ftp'.
;; * Investigate, why `tramp-test11-copy-file' and `tramp-test12-rename-file'
;; do not work properly for `nextcloud'.
;; * Fix `tramp-test29-start-file-process' and
;; `tramp-test30-make-process' on MS Windows (`process-send-eof'?).
;; * Implement `tramp-test31-interrupt-process' for `adb'. Fix `:unstable'.
;; * Implement `tramp-test31-interrupt-process' for `adb'.
;; * Fix Bug#16928 in `tramp-test43-asynchronous-requests'. A remote
;; file name operation cannot run in the timer. Remove `:unstable' tag?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment