unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: emacs-devel@gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
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	[thread overview]
Message-ID: <87ftms4y30.fsf@tcd.ie> (raw)
In-Reply-To: <87sgqs4ye0.fsf@tcd.ie> (Basil L. Contovounesios's message of "Fri, 26 Jul 2019 16:19:03 +0100")

"Basil L. Contovounesios" <contovob@tcd.ie> 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	other threads:[~2019-07-26 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190726075902.16162.83489@vcs0.savannah.gnu.org>
     [not found] ` <20190726075904.0A44C20C06@vcs0.savannah.gnu.org>
2019-07-26 15:19   ` [Emacs-diffs] master 66db7b2 1/2: Always include the number of unexpected results here too Basil L. Contovounesios
2019-07-26 15:25     ` Basil L. Contovounesios [this message]
2019-07-27 10:07     ` Lars Ingebrigtsen
2019-07-27 11:58       ` Basil L. Contovounesios
2019-07-27 12:04         ` Lars Ingebrigtsen
2019-07-27 14:23         ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftms4y30.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).