diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-05 22:52:37 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-06 17:55:48 -0700 |
commit | 4f50671699090089b7967880f9b0291391c8de1a (patch) | |
tree | 604edc8a9a6fb3e0fd4b1b57aa65efecadccbc59 /t | |
parent | 6fecf1915c5fd0b14e2ca2ec9e1a6b620abfb5c2 (diff) | |
download | git-4f50671699090089b7967880f9b0291391c8de1a.tar.gz git-4f50671699090089b7967880f9b0291391c8de1a.tar.xz |
t6030: add a bit more tests to git-bisect
Verify that git-bisect does not start before getting one bad and
one good commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-x | t/t6030-bisect-run.sh | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/t/t6030-bisect-run.sh b/t/t6030-bisect-run.sh index 455dc6081..4910ff684 100755 --- a/t/t6030-bisect-run.sh +++ b/t/t6030-bisect-run.sh @@ -2,7 +2,7 @@ # # Copyright (c) 2007 Christian Couder # -test_description='Tests git-bisect run functionality' +test_description='Tests git-bisect functionality' . ./test-lib.sh @@ -37,6 +37,42 @@ test_expect_success \ HASH3=$(git rev-list HEAD | head -2 | tail -1) && HASH4=$(git rev-list HEAD | head -1)' +test_expect_success 'bisect does not start with only one bad' ' + git bisect reset && + git bisect start && + git bisect bad $HASH4 || return 1 + + if git bisect next + then + echo Oops, should have failed. + false + else + : + fi +' + +test_expect_success 'bisect does not start with only one good' ' + git bisect reset && + git bisect start && + git bisect good $HASH1 || return 1 + + if git bisect next + then + echo Oops, should have failed. + false + else + : + fi +' + +test_expect_success 'bisect start with one bad and good' ' + git bisect reset && + git bisect start && + git bisect good $HASH1 && + git bisect bad $HASH4 && + git bisect next +' + # We want to automatically find the commit that # introduced "Another" into hello. test_expect_success \ |