summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fecf19)
raw | patch | inline | side by side (parent: 6fecf19)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 6 Apr 2007 05:52:37 +0000 (22:52 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 7 Apr 2007 00:55:48 +0000 (17:55 -0700) |
Verify that git-bisect does not start before getting one bad and
one good commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
one good commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/t6030-bisect-run.sh | patch | blob | history |
diff --git a/t/t6030-bisect-run.sh b/t/t6030-bisect-run.sh
index 455dc60812ea43fad633c9006e5f67708dd099ee..4910ff68416c8d59da6851459debeb198987b7c7 100755 (executable)
--- a/t/t6030-bisect-run.sh
+++ b/t/t6030-bisect-run.sh
#
# Copyright (c) 2007 Christian Couder
#
-test_description='Tests git-bisect run functionality'
+test_description='Tests git-bisect functionality'
. ./test-lib.sh
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 \