emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 66db7b2 1/2: Always include the number of unexp


From: Basil L. Contovounesios
Subject: Re: [Emacs-diffs] master 66db7b2 1/2: Always include the number of unexpected results here too
Date: Fri, 26 Jul 2019 16:25:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

"Basil L. Contovounesios" <address@hidden> writes:

> diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
> index 272fd4aec2..c659e4f3fc 100644
> --- a/lisp/emacs-lisp/ert.el
> +++ b/lisp/emacs-lisp/ert.el
> @@ -1496,16 +1496,16 @@ ert-summarize-tests-batch-and-exit
>            (setq ntests (+ ntests (string-to-number (match-string 1))))
>            (if (not (re-search-forward "^\\(Aborted: \\)?\
>  Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\
> -\\(?:, \\([0-9]+\\) unexpected\\)?\
> +, \\([0-9]+\\) unexpected\
>  \\(?:, \\([0-9]+\\) skipped\\)?" nil t))
>                (push logfile badtests)
>              (if (match-string 1) (push logfile badtests))
>              (setq nrun (+ nrun (string-to-number (match-string 2)))
>                    nexpected (+ nexpected (string-to-number (match-string 
> 3))))
> -            (when (match-string 4)
> -              (push logfile unexpected)
> -              (setq nunexpected (+ nunexpected
> -                                   (string-to-number (match-string 4)))))
> +            (let ((n (string-to-number (match-string 4))))
> +              (setq nunexpected (+ nunexpected n))
> +              (unless (zerop n)
> +                (push logfile unexpected)))

Er, obviously 'nunexpected' can be incremented within the 'unless' as
well.

-- 
Basil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]