File: wrap_call.t

package info (click to toggle)
libgnupg-interface-perl 0.52-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,296 kB
  • sloc: perl: 3,637; makefile: 10; sh: 1
file content (59 lines) | stat: -rw-r--r-- 942 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/perl -w
#
#  $Id: wrap_call.t,v 1.1 2001/05/03 07:32:34 ftobin Exp $
#

use strict;

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

TEST
{
    reset_handles();

    my $pid = $gnupg->wrap_call
      ( commands     => [ qw( --list-packets ) ],
        command_args => [ qw( test/key.1.asc ) ],
        handles      => $handles,
      );

    close $stdin;

    my @out = <$stdout>;
    waitpid $pid, 0;

    return @out > 0;  #just check if we have output.
};

TEST
{
    return $CHILD_ERROR == 0;
};


# same as above, but now with deprecated stuff
TEST
{
    reset_handles();

    my $pid = $gnupg->wrap_call
      ( gnupg_commands     => [ qw( --list-packets ) ],
        gnupg_command_args => [ qw( test/key.1.asc ) ],
        handles      => $handles,
      );

    close $stdin;

    my @out = <$stdout>;
    waitpid $pid, 0;

    return @out > 0;  #just check if we have output.
};


TEST
{
    return $CHILD_ERROR == 0;
};