Unbreak process tests if 'errno' is not installed.

* test/src/process-tests.el (process-tests--EMFILE-message): Don't
signal an error if the 'errno' binary is unavailable.
This commit is contained in:
Philipp Stephani 2020-12-31 13:17:11 +01:00
parent efe591143f
commit 57d97bb170

View file

@ -701,7 +701,9 @@ Return nil if that can't be determined."
(when (eq process-tests--EMFILE-message :unknown)
(setq process-tests--EMFILE-message
(with-temp-buffer
(when (eql (call-process "errno" nil t nil "EMFILE") 0)
(when (eql (ignore-error 'file-error
(call-process "errno" nil t nil "EMFILE"))
0)
(goto-char (point-min))
(when (looking-at (rx "EMFILE" (+ blank) (+ digit)
(+ blank) (group (+ nonl))))