aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-11-25 23:50:58 -0500
committerJunio C Hamano <gitster@pobox.com>2007-11-25 21:23:28 -0800
commit10507857fe8c5d8774d016a8542c8dd572271a8a (patch)
treed09dbbd354c2f19693252c9f8bb09d11c4d161d9 /t
parentc1a41b9d04d81f1c64754c933ef596045cfb99aa (diff)
downloadgit-10507857fe8c5d8774d016a8542c8dd572271a8a.tar.gz
git-10507857fe8c5d8774d016a8542c8dd572271a8a.tar.xz
git-tag: test that -s implies an annotated tag
This detects a regression introduced while moving git-tag to a C builtin. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-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 736f22e4a..c7130c4dc 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -667,6 +667,22 @@ test_expect_success 'creating a signed tag with -F - should succeed' '
git diff expect actual
'
+cat >fakeeditor <<'EOF'
+#!/bin/sh
+test -n "$1" && exec >"$1"
+echo A signed tag message
+echo from a fake editor.
+EOF
+chmod +x fakeeditor
+get_tag_header implied-annotate $commit commit $time >expect
+./fakeeditor >>expect
+echo '-----BEGIN PGP SIGNATURE-----' >>expect
+test_expect_success '-s implies annotated tag' '
+ GIT_EDITOR=./fakeeditor git-tag -s implied-annotate &&
+ get_tag_msg implied-annotate >actual &&
+ git diff expect actual
+'
+
test_expect_success \
'trying to create a signed tag with non-existing -F file should fail' '
! test -f nonexistingfile &&