Skip to content

Commit f445500

Browse files
committed
t/README: test_must_fail is for testing Git
When a test wants to make sure there is no <string> in an output file, we should just say "! grep string output". "test_must_fail" is there only to test Git command and catch unusual deaths we know about (e.g. segv) as an error, not as an expected failure. "test_must_fail grep string output" is unnecessary, as we are not making sure the system binaries do not dump core or anything like that. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4b8f772 commit f445500

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

t/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ Don't:
324324
use 'test_must_fail git cmd'. This will signal a failure if git
325325
dies in an unexpected way (e.g. segfault).
326326

327+
On the other hand, don't use test_must_fail for running regular
328+
platform commands; just use '! cmd'.
329+
327330
- use perl without spelling it as "$PERL_PATH". This is to help our
328331
friends on Windows where the platform Perl often adds CR before
329332
the end of line, and they bundle Git with a version of Perl that

0 commit comments

Comments
 (0)