(should-not (process-query-on-exit-flag process))))
(kill-process process)))))
+;; Return t if OUTPUT could have been generated by merging the INPUTS somehow.
+(defun process-tests--mixable (output &rest inputs)
+ (while (and output (let ((ins inputs))
+ (while (and ins (not (eq (car (car ins)) (car output))))
+ (setq ins (cdr ins)))
+ (if ins
+ (setcar ins (cdr (car ins))))
+ ins))
+ (setq output (cdr output)))
+ (not (apply #'append output inputs)))
+
(ert-deftest make-process/mix-stderr ()
"Check that `make-process' mixes the output streams if STDERR is nil."
(skip-unless (executable-find "bash"))
(accept-process-output process))
(should (eq (process-status process) 'exit))
(should (eq (process-exit-status process) 0))
- (should (equal (buffer-string) "stdout\nstderr\n")))))
+ (should (process-tests--mixable (string-to-list (buffer-string))
+ (string-to-list "stdout\n")
+ (string-to-list "stderr\n"))))))
(provide 'process-tests)
;; process-tests.el ends here.