projects
/
app-edwardng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add pubkey importing support
[app-edwardng.git]
/
t
/
App-EdwardNG.t
diff --git
a/t/App-EdwardNG.t
b/t/App-EdwardNG.t
index 4b4550eed576672e7135dfdc550e4eb78843cf3d..015e054d68898892171dda131067a2120a5c460a 100644
(file)
--- a/
t/App-EdwardNG.t
+++ b/
t/App-EdwardNG.t
@@
-5,16
+5,20
@@
use warnings;
use constant KEYID => '34B22806';
use constant EMAIL => 'EdwardNG (Key for testing EdwardNG) <edwardng@ieval.ro>';
use constant KEYID => '34B22806';
use constant EMAIL => 'EdwardNG (Key for testing EdwardNG) <edwardng@ieval.ro>';
-use Test::More tests =>
19
;
-BEGIN { use_ok('App::EdwardNG') };
+use Test::More tests =>
20
;
+BEGIN { use_ok('App::EdwardNG'
, qw/import_pubkeys process_message/
) };
$ENV{EDWARDNG_DEBUG} = $ENV{TEST_VERBOSE};
$ENV{EDWARDNG_KEYDIR} = 't/keydir';
$ENV{EDWARDNG_DEBUG} = $ENV{TEST_VERBOSE};
$ENV{EDWARDNG_KEYDIR} = 't/keydir';
+my $contains_pubkey = App::EdwardNG::mp->parse_open('t/data/contains-pubkey');
+my @keys = import_pubkeys ($contains_pubkey, App::EdwardNG::mg);
+is $keys[0], 'DE12658069C2F09BF996CC855AAF79E969137654', 'import_pubkeys';
+
my ($tmpl, %params);
sub process {
my ($name, $expected) = @_;
my ($tmpl, %params);
sub process {
my ($name, $expected) = @_;
- ($tmpl, %params) =
App::EdwardNG::
process_message("t/data/$name");
+ ($tmpl, %params) = process_message("t/data/$name");
is $tmpl, $expected, "Result for $name is $expected" or diag "GnuPG said: $params{message}"
}
is $tmpl, $expected, "Result for $name is $expected" or diag "GnuPG said: $params{message}"
}
This page took
0.01012 seconds
and
4
git commands to generate.