Skip to content

Commit 110bdbd

Browse files
committed
Merge branch 'st/verify-tag' into maint
A few unterminated here documents in tests were fixed, which in turn revealed incorrect expectations the tests make. These tests have been updated. * st/verify-tag: t7004, t7030: fix here-doc syntax errors
2 parents 57009b1 + b42ca35 commit 110bdbd

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

t/t7004-tag.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -879,18 +879,16 @@ test_expect_success GPG 'verifying a forged tag should fail' '
879879
test_must_fail git tag -v forged-tag
880880
'
881881

882-
test_expect_success 'verifying a proper tag with --format pass and format accordingly' '
883-
cat >expect <<-\EOF
882+
test_expect_success GPG 'verifying a proper tag with --format pass and format accordingly' '
883+
cat >expect <<-\EOF &&
884884
tagname : signed-tag
885-
EOF &&
885+
EOF
886886
git tag -v --format="tagname : %(tag)" "signed-tag" >actual &&
887887
test_cmp expect actual
888888
'
889889

890-
test_expect_success 'verifying a forged tag with --format fail and format accordingly' '
891-
cat >expect <<-\EOF
892-
tagname : forged-tag
893-
EOF &&
890+
test_expect_success GPG 'verifying a forged tag with --format should fail silently' '
891+
>expect &&
894892
test_must_fail git tag -v --format="tagname : %(tag)" "forged-tag" >actual &&
895893
test_cmp expect actual
896894
'

t/t7030-verify-tag.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,16 @@ test_expect_success GPG 'verify multiple tags' '
125125
test_cmp expect.stderr actual.stderr
126126
'
127127

128-
test_expect_success 'verifying tag with --format' '
129-
cat >expect <<-\EOF
128+
test_expect_success GPG 'verifying tag with --format' '
129+
cat >expect <<-\EOF &&
130130
tagname : fourth-signed
131-
EOF &&
131+
EOF
132132
git verify-tag --format="tagname : %(tag)" "fourth-signed" >actual &&
133133
test_cmp expect actual
134134
'
135135

136-
test_expect_success 'verifying a forged tag with --format fail and format accordingly' '
137-
cat >expect <<-\EOF
138-
tagname : 7th forged-signed
139-
EOF &&
136+
test_expect_success GPG 'verifying a forged tag with --format should fail silently' '
137+
>expect &&
140138
test_must_fail git verify-tag --format="tagname : %(tag)" $(cat forged1.tag) >actual-forged &&
141139
test_cmp expect actual-forged
142140
'

0 commit comments

Comments
 (0)