GNU bug report logs - #43202
list-processes--refresh Wrong type argument

Previous Next

Package: emacs;

Reported by: dick.r.chiang <at> gmail.com

Date: Fri, 4 Sep 2020 13:02:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: dick.r.chiang <at> gmail.com
Cc: 43202 <at> debbugs.gnu.org
Subject: bug#43202: patch
Date: Fri, 04 Sep 2020 15:29:56 +0200
dick.r.chiang <at> gmail.com 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




This bug report was last modified 4 years and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.