all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* calling ert from a script
@ 2013-04-16 23:03 Richard H Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Richard H Lee @ 2013-04-16 23:03 UTC (permalink / raw)
  To: help-gnu-emacs

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?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: calling ert from a script
       [not found] <mailman.24241.1366154251.855.help-gnu-emacs@gnu.org>
@ 2013-04-17 14:52 ` Lowell Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Lowell Gilbert @ 2013-04-17 14:52 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-17 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.24241.1366154251.855.help-gnu-emacs@gnu.org>
2013-04-17 14:52 ` calling ert from a script Lowell Gilbert
2013-04-16 23:03 Richard H Lee

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.