Staging
v0.8.1
v0.8.1
Revision 90d0ed96b76ee51f8ae6f32923b92e7b20ba73c0 authored by Junio C Hamano on 28 February 2008, 21:09:30 UTC, committed by Junio C Hamano on 03 March 2008, 07:15:06 UTC
When we expect a git command to notice and signal errors, we carelessly wrote in our tests: test_expect_success 'reject bogus request' ' do something && do something else && ! git command ' but a non-zero exit could come from the "git command" segfaulting. A new helper function "tset_must_fail" is introduced and it is meant to be used to make sure the command gracefully fails (iow, dying and exiting with non zero status is counted as a failure to "gracefully fail"). The above example should be written as: test_expect_success 'reject bogus request' ' do something && do something else && test_must_fail git command ' Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent fcbcfe7
File | Mode | Size |
---|---|---|
hstrerror.c | -rw-r--r-- | 513 bytes |
inet_ntop.c | -rw-r--r-- | 4.9 KB |
inet_pton.c | -rw-r--r-- | 6.9 KB |
memmem.c | -rw-r--r-- | 668 bytes |
mkdtemp.c | -rw-r--r-- | 152 bytes |
mmap.c | -rw-r--r-- | 747 bytes |
pread.c | -rw-r--r-- | 433 bytes |
setenv.c | -rw-r--r-- | 786 bytes |
strcasestr.c | -rw-r--r-- | 431 bytes |
strlcpy.c | -rw-r--r-- | 247 bytes |
strtoumax.c | -rw-r--r-- | 217 bytes |
unsetenv.c | -rw-r--r-- | 558 bytes |
Computing file changes ...