Skip to content

Commit 971ecbd

Browse files
drafnelgitster
authored andcommitted
t/README: clarify test_must_fail description
Some have found the wording of the description to be somewhat ambiguous with respect to when it is desirable to use test_must_fail instead of "! <git-command>". Tweak the wording somewhat to hopefully clarify that it is _because_ test_must_fail can detect segmentation fault that it is desirable to use it instead of "! <git-command>". Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3c9d041 commit 971ecbd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,14 @@ library for your script to use.
275275
Merges the given rev using the given message. Like test_commit,
276276
creates a tag and calls test_tick before committing.
277277

278+
- test_must_fail <git-command>
279+
280+
Run a git command and ensure it fails in a controlled way. Use
281+
this instead of "! <git-command>". When git-command dies due to a
282+
segfault, test_must_fail diagnoses it as an error; "! <git-command>"
283+
treats it as just another expected failure, which would let such a
284+
bug go unnoticed.
285+
278286
Tips for Writing Tests
279287
----------------------
280288

0 commit comments

Comments
 (0)