Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:35

Jean Privat [off-list ref] 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".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help