Permalink
Browse files

test for multipart signature, where text is quoted printable encoded.

This is based on RT ticket #46168
  • Loading branch information...
1 parent ada701b commit e8978b81ae98248a72cfb2994f52ee231eaf5f34 @bremner bremner committed Dec 13, 2010
Showing with 28 additions and 0 deletions.
  1. +28 −0 t/25.multipart-verify.t
View
@@ -0,0 +1,28 @@
+# -*- perl -*-
+
+use Test::More;
+use Mail::GnuPG;
+use MIME::Entity;
+use strict;
+
+plan tests => 5;
+
+# Main program
+my $parser = new MIME::Parser;
+$parser->output_to_core(1);
+$parser->decode_bodies(0);
+
+my $entity= $parser->parse_open("t/msg/multipart-signed-qp.eml") ;
+isa_ok($entity,"MIME::Entity");
+
+my $mg = new Mail::GnuPG( key => '49539D60EFEA4EAD',
+ passphrase => 'passphrase');
+
+isa_ok($mg,"Mail::GnuPG");
+
+my ($return,$keyid,$uid) = $mg->verify($entity);
+is($return,0,"verify success");
+is($keyid,'9456D16A',"verify keyid");
+is($uid,'Mauricio Campiglia <mauricio@campiglia.org>',"verify uid");
+
+end:

0 comments on commit e8978b8

Please sign in to comment.