]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t6030-bisect-porcelain.sh
bisect: verify that a bogus option won't try to start a bisection
[thirdparty/git.git] / t / t6030-bisect-porcelain.sh
index 98a72ff78a78905df62869a9a1177af5324db01c..9e56b42b5da77765e17fa91ee05149aa61f6859e 100755 (executable)
@@ -1058,6 +1058,16 @@ test_expect_success 'bisect start with one term1 and term2' '
        git bisect reset
 '
 
+test_expect_success 'bogus command does not start bisect' '
+       git bisect reset &&
+       test_must_fail git bisect --bisect-terms 1 2 2>out &&
+       ! grep "You need to start" out &&
+       test_must_fail git bisect --bisect-terms 2>out &&
+       ! grep "You need to start" out &&
+       grep "git bisect.*visualize" out &&
+       git bisect reset
+'
+
 test_expect_success 'bisect replay with term1 and term2' '
        git bisect replay log_to_replay.txt >bisect_result &&
        grep "$HASH2 is the first term1 commit" bisect_result &&