diff options
Diffstat (limited to 't/import_keys.t')
-rw-r--r-- | t/import_keys.t | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/t/import_keys.t b/t/import_keys.t new file mode 100644 index 0000000..dc4a5a2 --- /dev/null +++ b/t/import_keys.t @@ -0,0 +1,39 @@ +#!/usr/bin/perl -w +# +# $Id: import_keys.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ +# + +use strict; +use English qw( -no_match_vars ); + +use lib './t'; +use MyTest; +use MyTestSpecific; + +TEST +{ + reset_handles(); + + my $pid = $gnupg->import_keys( handles => $handles ); + + print $stdin @{ $texts{key}->data() }; + close $stdin; + my @output = <$stdout>; + waitpid $pid, 0; + + return $CHILD_ERROR == 0; +}; + + +TEST +{ + reset_handles(); + + $handles->stdin( $texts{key}->fh() ); + $handles->options( 'stdin' )->{direct} = 1; + + my $pid = $gnupg->import_keys( handles => $handles ); + waitpid $pid, 0; + + return $CHILD_ERROR == 0; +}; |