all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lowell Gilbert <lgusenet@be-well.ilk.org>
To: help-gnu-emacs@gnu.org
Subject: Re: calling ert from a script
Date: Wed, 17 Apr 2013 10:52:08 -0400	[thread overview]
Message-ID: <4461zltdk7.fsf@lowell-desk.lan> (raw)
In-Reply-To: mailman.24241.1366154251.855.help-gnu-emacs@gnu.org

Richard H Lee <ricardohenrylee@gmail.com> writes:

> I'm using ert for unit testing currently.
>
> I know you can call ert interactively to run all defined tests. When
> you do so tests pass and fail as expected.
>
> I have a script that clears existing tests, reloads the file under
> test and the tests themselves and then runs the tests. The way I run
> the tests is by calling (ert t) . This is the same thing that is
> called when you call ert interactively.
>
> However when I call (ert t) from a script, rather than passing and
> failing tests, it aborts at the first failure, not running any further
> tests. (And it returns with an eval error saying that the test
> failed.)
>
> Can anybody tell me why this happens?

From the output of "C-f ert":
    ert is an alias for `ert-run-tests-interactively' in `ert.el'.

    (ert SELECTOR &optional OUTPUT-BUFFER-NAME MESSAGE-FN)

    Run the tests specified by SELECTOR and display the results in a buffer.

    SELECTOR works as described in `ert-select-tests'.
    OUTPUT-BUFFER-NAME and MESSAGE-FN should normally be nil; they
    are used for automated self-tests and specify which buffer to use
    and how to display message.

There's a whole manual for ert, but the fairly brief comments at the top
of ert.el will probably be enough for you.


       reply	other threads:[~2013-04-17 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.24241.1366154251.855.help-gnu-emacs@gnu.org>
2013-04-17 14:52 ` Lowell Gilbert [this message]
2013-04-16 23:03 calling ert from a script Richard H Lee

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

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

  git send-email \
    --in-reply-to=4461zltdk7.fsf@lowell-desk.lan \
    --to=lgusenet@be-well.ilk.org \
    --cc=help-gnu-emacs@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.