File: encrypt_symmetrically.t

package info (click to toggle)
libgnupg-interface-perl 0.33-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 384 kB
  • ctags: 55
  • sloc: perl: 1,357; makefile: 54
file content (39 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/perl -w
#
# $Id: encrypt_symmetrically.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $
#

use strict;
use English;

use lib './t';
use MyTest;
use MyTestSpecific;

TEST
{
    reset_handles();
    
    my $pid = $gnupg->encrypt_symmetrically( handles => $handles );
    
    print $stdin @{ $texts{plain}->data() };
    close $stdin;
    waitpid $pid, 0;
    
    return $CHILD_ERROR == 0;
};



TEST
{
    reset_handles();
    
    $handles->stdin( $texts{plain}->fh() );
    $handles->options( 'stdin' )->{direct} = 1;
    my $pid = $gnupg->encrypt_symmetrically( handles => $handles );
    
    waitpid $pid, 0;
    
    return $CHILD_ERROR == 0;
};