(signal 'wrong-type-argument (list #'stringp name)))
(unless (or (null buffer) (bufferp buffer) (stringp buffer))
(signal 'wrong-type-argument (list #'stringp buffer)))
- (unless (consp command)
+ (unless (or (null command) (consp command))
(signal 'wrong-type-argument (list #'consp command)))
(unless (or (null coding)
(and (symbolp coding) (memq coding coding-system-list))
(while (accept-process-output proc 0 nil t))))
(should (string-match "foo" (buffer-string))))
+ ;; Cleanup.
+ (ignore-errors (delete-process proc)))
+
+ ;; PTY.
+ (unwind-protect
+ (with-temp-buffer
+ ;; It works only for tramp-sh.el, and not direct async processes.
+ (if (or (not (tramp--test-sh-p)) (tramp-direct-async-process-p))
+ (should-error
+ (start-file-process "test4" (current-buffer) nil)
+ :type 'wrong-type-argument)
+ (setq proc (start-file-process "test4" (current-buffer) nil))
+ (should (processp proc))
+ (should (equal (process-status proc) 'run))
+ (should (stringp (process-tty-name proc)))))
+
;; Cleanup.
(ignore-errors (delete-process proc))))))