]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7030-verify-tag.sh
verify-tag: add option to print raw gpg status information
[thirdparty/git.git] / t / t7030-verify-tag.sh
index 632bc53440404fca768736fd57108e5c9737446e..4608e713438f93087d12664a17654c07be38c59f 100755 (executable)
@@ -81,4 +81,35 @@ test_expect_success GPG 'detect fudged signature' '
        ! grep "Good signature from" actual1
 '
 
+test_expect_success GPG 'verify signatures with --raw' '
+       (
+               for tag in initial second merge fourth-signed sixth-signed seventh-signed
+               do
+                       git verify-tag --raw $tag 2>actual &&
+                       grep "GOODSIG" actual &&
+                       ! grep "BADSIG" actual &&
+                       echo $tag OK || exit 1
+               done
+       ) &&
+       (
+               for tag in fourth-unsigned fifth-unsigned sixth-unsigned
+               do
+                       test_must_fail git verify-tag --raw $tag 2>actual &&
+                       ! grep "GOODSIG" actual &&
+                       ! grep "BADSIG" actual &&
+                       echo $tag OK || exit 1
+               done
+       ) &&
+       (
+               for tag in eighth-signed-alt
+               do
+                       git verify-tag --raw $tag 2>actual &&
+                       grep "GOODSIG" actual &&
+                       ! grep "BADSIG" actual &&
+                       grep "TRUST_UNDEFINED" actual &&
+                       echo $tag OK || exit 1
+               done
+       )
+'
+
 test_done