Skip to content

Commit

Permalink
t8001/t8002: blame: decompose overly-large test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sunshine authored and Junio C Hamano committed Aug 5, 2013
1 parent f5206f1 commit f350cf9
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions t/annotate-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,30 @@ test_expect_success 'blame -L :nomatch' '
test_must_fail $PROG -L:nomatch hello.c
'

test_expect_success 'blame -L bogus' '
test_must_fail $PROG -L file &&
test_must_fail $PROG -L1,+ file &&
test_must_fail $PROG -L1,- file &&
test_must_fail $PROG -LX file &&
test_must_fail $PROG -L1,X file &&
test_must_fail $PROG -L1,+N file &&
test_expect_success 'blame -L' '
test_must_fail $PROG -L file
'

test_expect_success 'blame -L X,+' '
test_must_fail $PROG -L1,+ file
'

test_expect_success 'blame -L X,-' '
test_must_fail $PROG -L1,- file
'

test_expect_success 'blame -L X (non-numeric X)' '
test_must_fail $PROG -LX file
'

test_expect_success 'blame -L X,Y (non-numeric Y)' '
test_must_fail $PROG -L1,Y file
'

test_expect_success 'blame -L X,+N (non-numeric N)' '
test_must_fail $PROG -L1,+N file
'

test_expect_success 'blame -L X,-N (non-numeric N)' '
test_must_fail $PROG -L1,-N file
'

0 comments on commit f350cf9

Please sign in to comment.