Custom low-level merge driver: change the configuration scheme.
[gitweb.git] / t / t6030-bisect-run.sh
index 455dc60812ea43fad633c9006e5f67708dd099ee..de3123522aba7d4a371cc30d8fbbd74f4d063d19 100755 (executable)
@@ -2,7 +2,9 @@
 #
 # Copyright (c) 2007 Christian Couder
 #
-test_description='Tests git-bisect run functionality'
+test_description='Tests git-bisect functionality'
+
+exec </dev/null
 
 . ./test-lib.sh
 
@@ -37,6 +39,35 @@ test_expect_success \
      HASH3=$(git rev-list HEAD | head -2 | tail -1) &&
      HASH4=$(git rev-list HEAD | head -1)'
 
+test_expect_success 'bisect starts with only one bad' '
+       git bisect reset &&
+       git bisect start &&
+       git bisect bad $HASH4 &&
+       git bisect next
+'
+
+test_expect_success 'bisect starts 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 \