aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus2013-10-24 09:40:05 +0200
committerMichael Albinus2013-10-24 09:40:05 +0200
commit955ada112b25068c6756b9fa904c6701da9911b0 (patch)
treea95680413a23b0a095bb403a485d6861f569400e /doc
parent4ddbf128362dcb0a0a8abe42348ff20d3d511ab6 (diff)
downloademacs-955ada112b25068c6756b9fa904c6701da9911b0.tar.gz
emacs-955ada112b25068c6756b9fa904c6701da9911b0.zip
* ert.texi (Running Tests Interactively): Adapt examle output.
(Tests and Their Environment): Mention skip-unless.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/ert.texi20
2 files changed, 22 insertions, 3 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index ad045fc6d5f..1396fc12f43 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
12013-10-24 Michael Albinus <michael.albinus@gmx.de>
2
3 * ert.texi (Running Tests Interactively): Adapt examle output.
4 (Tests and Their Environment): Mention skip-unless.
5
12013-10-23 Glenn Morris <rgm@gnu.org> 62013-10-23 Glenn Morris <rgm@gnu.org>
2 7
3 * dired-x.texi, ebrowse.texi, ede.texi, eieio.texi, eshell.texi: 8 * dired-x.texi, ebrowse.texi, ede.texi, eieio.texi, eshell.texi:
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 8728d53ea27..ac87b98eae9 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -183,9 +183,10 @@ tests run. It looks like this:
183 183
184@example 184@example
185Selector: t 185Selector: t
186Passed: 31 186Passed: 31
187Failed: 2 (2 unexpected) 187Skipped: 0
188Total: 33/33 188Failed: 2 (2 unexpected)
189Total: 33/33
189 190
190Started at: 2008-09-11 08:39:25-0700 191Started at: 2008-09-11 08:39:25-0700
191Finished. 192Finished.
@@ -454,6 +455,19 @@ versions, specific architectures, etc.:
454@node Tests and Their Environment 455@node Tests and Their Environment
455@section Tests and Their Environment 456@section Tests and Their Environment
456 457
458Sometimes, it doesn't make sense to run a test due to missing
459preconditions. A required Emacs feature might not be compiled in, the
460function to be tested could call an external binary which might not be
461available on the test machine, you name it. In this case, the macro
462@code{skip-unless} could be used to skip the test:
463
464@lisp
465(ert-deftest test-dbus ()
466 "A test that checks D-BUS functionality."
467 (skip-unless (featurep 'dbusbind))
468 ...)
469@end lisp
470
457The outcome of running a test should not depend on the current state 471The outcome of running a test should not depend on the current state
458of the environment, and each test should leave its environment in the 472of the environment, and each test should leave its environment in the
459same state it found it in. In particular, a test should not depend on 473same state it found it in. In particular, a test should not depend on