summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2013-07-31 08:15:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-08-05 18:54:30 (GMT)
commitf350cf9ea5058ca0ad9e02033616d574c59ee064 (patch)
tree6ed889856acc565a4ff542b98810a843c383e1b8
parentf5206f1239a2f193aed16bac1c3b8cf71dfbce39 (diff)
downloadgit-f350cf9ea5058ca0ad9e02033616d574c59ee064.zip
git-f350cf9ea5058ca0ad9e02033616d574c59ee064.tar.gz
git-f350cf9ea5058ca0ad9e02033616d574c59ee064.tar.bz2
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>
-rw-r--r--t/annotate-tests.sh32
1 files changed, 25 insertions, 7 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index d4e7f47..ffc5697 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -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
'