diff: respect MIN_BLOCK_LENGTH for last block
[gitweb.git] / t / t7030-verify-tag.sh
index 4608e713438f93087d12664a17654c07be38c59f..b4b49eeb08313df8d260a17414a19e7ac2fdc901 100755 (executable)
@@ -112,4 +112,31 @@ test_expect_success GPG 'verify signatures with --raw' '
        )
 '
 
+test_expect_success GPG 'verify multiple tags' '
+       tags="fourth-signed sixth-signed seventh-signed" &&
+       for i in $tags
+       do
+               git verify-tag -v --raw $i || return 1
+       done >expect.stdout 2>expect.stderr.1 &&
+       grep "^.GNUPG:." <expect.stderr.1 >expect.stderr &&
+       git verify-tag -v --raw $tags >actual.stdout 2>actual.stderr.1 &&
+       grep "^.GNUPG:." <actual.stderr.1 >actual.stderr &&
+       test_cmp expect.stdout actual.stdout &&
+       test_cmp expect.stderr actual.stderr
+'
+
+test_expect_success GPG 'verifying tag with --format' '
+       cat >expect <<-\EOF &&
+       tagname : fourth-signed
+       EOF
+       git verify-tag --format="tagname : %(tag)" "fourth-signed" >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success GPG 'verifying a forged tag with --format should fail silently' '
+       >expect &&
+       test_must_fail git verify-tag --format="tagname : %(tag)" $(cat forged1.tag) >actual-forged &&
+       test_cmp expect actual-forged
+'
+
 test_done