summaryrefslogtreecommitdiff
path: root/t/t7004-tag.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-03-24 18:40:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-24 19:15:25 (GMT)
commitbf748049f53cea3662b02d87cc91d44a0164e588 (patch)
treed081a4249d71ef3affb566a19ee0b8bf04295301 /t/t7004-tag.sh
parent7ac04f1398c4e854cb585bd289ee4fe921984bbd (diff)
downloadgit-bf748049f53cea3662b02d87cc91d44a0164e588.zip
git-bf748049f53cea3662b02d87cc91d44a0164e588.tar.gz
git-bf748049f53cea3662b02d87cc91d44a0164e588.tar.bz2
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>
Diffstat (limited to 't/t7004-tag.sh')
-rwxr-xr-xt/t7004-tag.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 63ee2cf..92af8bb 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1455,8 +1455,24 @@ test_expect_success 'checking that initial commit is in all tags' "
test_expect_success 'mixing incompatibles modes and options is forbidden' '
test_must_fail git tag -a &&
+ test_must_fail git tag -a -l &&
+ test_must_fail git tag -s &&
+ test_must_fail git tag -s -l &&
+ test_must_fail git tag -m &&
+ test_must_fail git tag -m -l &&
+ test_must_fail git tag -m "hlagh" &&
+ test_must_fail git tag -m "hlagh" -l &&
+ test_must_fail git tag -F &&
+ test_must_fail git tag -F -l &&
+ test_must_fail git tag -f &&
+ test_must_fail git tag -f -l &&
+ test_must_fail git tag -a -s -m -F &&
+ test_must_fail git tag -a -s -m -F -l &&
test_must_fail git tag -l -v &&
+ test_must_fail git tag -l -d &&
+ test_must_fail git tag -l -v -d &&
test_must_fail git tag -n 100 &&
+ test_must_fail git tag -n 100 -v &&
test_must_fail git tag -l -m msg &&
test_must_fail git tag -l -F some file &&
test_must_fail git tag -v -s &&