Skip to content

Commit bf74804

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7ac04f1 commit bf74804

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

t/t7004-tag.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,8 +1455,24 @@ test_expect_success 'checking that initial commit is in all tags' "
14551455

14561456
test_expect_success 'mixing incompatibles modes and options is forbidden' '
14571457
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 &&
14581471
test_must_fail git tag -l -v &&
1472+
test_must_fail git tag -l -d &&
1473+
test_must_fail git tag -l -v -d &&
14591474
test_must_fail git tag -n 100 &&
1475+
test_must_fail git tag -n 100 -v &&
14601476
test_must_fail git tag -l -m msg &&
14611477
test_must_fail git tag -l -F some file &&
14621478
test_must_fail git tag -v -s &&

0 commit comments

Comments
 (0)