Skip to content

Commit f350cf9

Browse files
sunshinecogitster
authored andcommitted
t8001/t8002: blame: decompose overly-large test
Checking all bogus -L syntax forms in a single test makes it difficult to identify the offender when one case fails. Decompose this conglomerate test in order to check each bad syntax case separately. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f5206f1 commit f350cf9

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

t/annotate-tests.sh

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,30 @@ test_expect_success 'blame -L :nomatch' '
275275
test_must_fail $PROG -L:nomatch hello.c
276276
'
277277

278-
test_expect_success 'blame -L bogus' '
279-
test_must_fail $PROG -L file &&
280-
test_must_fail $PROG -L1,+ file &&
281-
test_must_fail $PROG -L1,- file &&
282-
test_must_fail $PROG -LX file &&
283-
test_must_fail $PROG -L1,X file &&
284-
test_must_fail $PROG -L1,+N file &&
278+
test_expect_success 'blame -L' '
279+
test_must_fail $PROG -L file
280+
'
281+
282+
test_expect_success 'blame -L X,+' '
283+
test_must_fail $PROG -L1,+ file
284+
'
285+
286+
test_expect_success 'blame -L X,-' '
287+
test_must_fail $PROG -L1,- file
288+
'
289+
290+
test_expect_success 'blame -L X (non-numeric X)' '
291+
test_must_fail $PROG -LX file
292+
'
293+
294+
test_expect_success 'blame -L X,Y (non-numeric Y)' '
295+
test_must_fail $PROG -L1,Y file
296+
'
297+
298+
test_expect_success 'blame -L X,+N (non-numeric N)' '
299+
test_must_fail $PROG -L1,+N file
300+
'
301+
302+
test_expect_success 'blame -L X,-N (non-numeric N)' '
285303
test_must_fail $PROG -L1,-N file
286304
'

0 commit comments

Comments
 (0)