Subject: bug#43202: patch

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 04 Sep 2020 15:29:56 +0200

[email-masked] writes:

Looks good.  Some comments:

> * lisp/simple.el (list-processes--refresh): network, serial, *or pipe*.
> * test/src/process-tests.el (process-test-stopped-pipe): add a test.

These aren't really descriptive (and each sentence should start with a
capital letter).

> +(ert-deftest process-test-stopped-pipe ()
> +  (skip-unless (executable-find "cat"))
> +  (with-temp-buffer
> +    (let ((proc (make-pipe-process :name "pipe" :buffer (current-buffer)
> +                                   :command '("cat") :stop t)))
> +      (unwind-protect
> +          (should (list-processes--refresh))
> +        (delete-process proc)))))

I don't think this test is correct -- you're really checking that
list-processes--refresh doesn't bug out; not that it returns non-nil (it
doesn't have a well-defined return value).

So if this is to be checked for (I'm not sure it adds much value as a
test), then it should check whether it errors out or not (and the value
should be disregarded).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no