tag: add more incompatibles mode tests

Amend the test suite to test for more invalid uses like "-l -a" etc. This change tests the code path in builtin/tag.c between lines: if (argc == 0 && !cmdmode) And: if ((create_tag_object || force) && (cmdmode != 0)) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Mar 24, 2017 at 18:40 UTC bf748049f53cea3662b02d87cc91d44a0164e588
1 file changed +16
t/t7004-tag.sh
+16
@@ -1455,8 +1455,24 @@ test_expect_success 'checking that initial commit is in all tags' "
1455
1456 test_expect_success 'mixing incompatibles modes and options is forbidden' '
1457 test_must_fail git tag -a &&
1458 + test_must_fail git tag -a -l &&
1459 + test_must_fail git tag -s &&
1460 + test_must_fail git tag -s -l &&
1461 + test_must_fail git tag -m &&
1462 + test_must_fail git tag -m -l &&
1463 + test_must_fail git tag -m "hlagh" &&
1464 + test_must_fail git tag -m "hlagh" -l &&
1465 + test_must_fail git tag -F &&
1466 + test_must_fail git tag -F -l &&
1467 + test_must_fail git tag -f &&
1468 + test_must_fail git tag -f -l &&
1469 + test_must_fail git tag -a -s -m -F &&
1470 + test_must_fail git tag -a -s -m -F -l &&
1471 test_must_fail git tag -l -v &&
1472 + test_must_fail git tag -l -d &&
1473 + test_must_fail git tag -l -v -d &&
1474 test_must_fail git tag -n 100 &&
1475 + test_must_fail git tag -n 100 -v &&
1476 test_must_fail git tag -l -m msg &&
1477 test_must_fail git tag -l -F some file &&
1478 test_must_fail git tag -v -s &&