t/t7004-tag: add regression test for successful tag creation
The standard tag message file is unlinked if the tag is created. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kristoffer Haugsbakk committed
May 16, 2023 at 19:55 UTC
669c11de85d0071a31de0e49f6e5b602fd54a9ef
1 file changed
+9
t/t7004-tag.sh
+9
@@ -2188,4 +2188,13 @@ test_expect_success 'Does --[no-]contains stop at commits? Yes!' '
2188
test_cmp expected actual
2189
'
2190
2191
+test_expect_success 'If tag is created then tag message file is unlinked' '
2192
+ test_when_finished "git tag -d foo" &&
2193
+ write_script fakeeditor <<-\EOF &&
2194
+ echo Message >.git/TAG_EDITMSG
2195
+ EOF
2196
+ GIT_EDITOR=./fakeeditor git tag -a foo &&
2197
+ test_path_is_missing .git/TAG_EDITMSG
2198
+'
2199
+
2200
test_done