@matheusbsbs / matheus-bagliano / commits / 10507857fe
Fork 0

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>

Jeff King committed Nov 25, 2007 at 23:50 UTC 10507857fe8c5d8774d016a8542c8dd572271a8a
1 file changed +16
t/t7004-tag.sh
+16
@@ -667,6 +667,22 @@ test_expect_success 'creating a signed tag with -F - should succeed' '
667 git diff expect actual
668 '
669
670 +cat >fakeeditor <<'EOF'
671 +#!/bin/sh
672 +test -n "$1" && exec >"$1"
673 +echo A signed tag message
674 +echo from a fake editor.
675 +EOF
676 +chmod +x fakeeditor
677 +get_tag_header implied-annotate $commit commit $time >expect
678 +./fakeeditor >>expect
679 +echo '-----BEGIN PGP SIGNATURE-----' >>expect
680 +test_expect_success '-s implies annotated tag' '
681 + GIT_EDITOR=./fakeeditor git-tag -s implied-annotate &&
682 + get_tag_msg implied-annotate >actual &&
683 + git diff expect actual
684 +'
685 +
686 test_expect_success \
687 'trying to create a signed tag with non-existing -F file should fail' '
688 ! test -f nonexistingfile &&