Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
955ada11
Commit
955ada11
authored
Oct 24, 2013
by
Michael Albinus
Browse files
* ert.texi (Running Tests Interactively): Adapt examle output.
(Tests and Their Environment): Mention skip-unless.
parent
4ddbf128
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
doc/misc/ChangeLog
doc/misc/ChangeLog
+5
-0
doc/misc/ert.texi
doc/misc/ert.texi
+17
-3
No files found.
doc/misc/ChangeLog
View file @
955ada11
2013-10-24 Michael Albinus <michael.albinus@gmx.de>
* ert.texi (Running Tests Interactively): Adapt examle output.
(Tests and Their Environment): Mention skip-unless.
2013-10-23 Glenn Morris <rgm@gnu.org>
* dired-x.texi, ebrowse.texi, ede.texi, eieio.texi, eshell.texi:
...
...
doc/misc/ert.texi
View file @
955ada11
...
...
@@ -184,6 +184,7 @@ tests run. It looks like this:
@example
Selector: t
Passed: 31
Skipped: 0
Failed: 2 (2 unexpected)
Total: 33/33
...
...
@@ -454,6 +455,19 @@ versions, specific architectures, etc.:
@node Tests and Their Environment
@section Tests and Their Environment
Sometimes, it doesn't make sense to run a test due to missing
preconditions. A required Emacs feature might not be compiled in, the
function to be tested could call an external binary which might not be
available on the test machine, you name it. In this case, the macro
@code{skip-unless} could be used to skip the test:
@lisp
(ert-deftest test-dbus ()
"
A
test
that
checks
D
-
BUS
functionality
.
"
(skip-unless (featurep 'dbusbind))
...)
@end lisp
The outcome of running a test should not depend on the current state
of the environment, and each test should leave its environment in the
same state it found it in. In particular, a test should not depend on
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment