Re: [PATCH v2] new --dirty option for git describe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jean Privat <jean@xxxxxxxxx> writes:

> +test_expect_success 'describe --dirty HEAD' '
> +	git describe --dirty HEAD
> +	test $? != 0
> +'

We tend to write this as

	test_expect_success '...' '
        	test_must_fail git describe --dirty HEAD
	'

The difference is when the tested command segfaults or dies in an
uncontrolled fashion; test_must_fail diagnoses it as a failure,
while "test $? != 0" at the end will say "ok, the command correctly
failed".

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]