summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2016-12-08 15:23:55 +0100
committerJunio C Hamano <gitster@pobox.com>2016-12-08 11:11:57 -0800
commiteba286e31012335370aedb7572ff51df549eb3f3 (patch)
tree15964dd23e98bb62b5f72ef992fd977292351491
parent8d7a455ed52e2a96debc080dfc011b6bb00db5d2 (diff)
downloadgit-eba286e31012335370aedb7572ff51df549eb3f3.tar.gz
t7004-tag: delete unnecessary tags with test_when_finished
The '--force is moot with a non-existing tag name' test creates two new tags, which are then deleted right after the test is finished, outside the test_expect_success block, allowing 'git tag -d's output to pollute the test output. Use test_when_finished to delete those tags. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7004-tag.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 8b0f71a2ac..396cffeeb5 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -122,11 +122,11 @@ test_expect_success '--force can create a tag with the name of one existing' '
tag_exists mytag'
test_expect_success '--force is moot with a non-existing tag name' '
+ test_when_finished git tag -d newtag forcetag &&
git tag newtag >expect &&
git tag --force forcetag >actual &&
test_cmp expect actual
'
-git tag -d newtag forcetag
# deleting tags: