chiark / gitweb /
test suite: tagupl: Test lack of signature
[dgit.git] / tests / tests / tagupl
index 0c88bda29b3765cdf7ae0576586b4136fa3fdd0a..80b92bee059d0f004fd3d56dfe05ded2cb0b325f 100755 (executable)
@@ -46,8 +46,6 @@ perl -i -ne '
        print or die $!;
 ' ../basetag
 
-git cat-file tag test-dummy/1.0-1 >../raw-base
-
 mv-ident () {
        local f=$tmp/$1
        if test -e $f; then
@@ -133,7 +131,20 @@ expect-email upsmism 's/ upstream=/$&3/' \
 cp -al ../$p ../$p.save
 cd ../$p
 
-tagname=test-dummy/1.0-1
+git cat-file tag $tagname >../raw-base
+
+next-mangle sigfail
+perl -pe <../raw-base >../tagobj-$ident 's/ split / split ignoreme /'
+raw-mangled
+grep 'gpgv: BAD signature' ../sendmail.log
+
+next-mangle nosig
+perl -ne <../raw-base >../tagobj-$ident 'print unless m/^-----/..0'
+raw-mangled
+grep 'missing signature' ../sendmail.log
+
+git cat-file tag test-dummy/1.0-1 >../raw-base
+
 next-mangle badtagger
 perl -pe <../raw-base '
        s/\+\d+$/xyz/ if m/^tagger /;