summaryrefslogtreecommitdiff
path: root/t/z_delete_keys.t
blob: b5d1215e2563cc84b39bb0fdfbf85172ca0356c4 (plain)
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
use strict;
use English qw( -no_match_vars );

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

TEST
{
    reset_handles();

    my $pid = $gnupg->wrap_call(
        gnupg_commands     => [qw( --delete-secret-keys )],
        gnupg_command_args => [qw( 0x93AFC4B1B0288A104996B44253AE596EF950DA9C )],
        handles            => $handles,
    );

    waitpid $pid, 0;

    return $CHILD_ERROR == 0;
};

TEST
{
    reset_handles();

    my $pid = $gnupg->wrap_call(
        gnupg_commands     => [qw( --delete-keys )],
        gnupg_command_args => [qw( 0x93AFC4B1B0288A104996B44253AE596EF950DA9C )],
        handles            => $handles,
    );

    waitpid $pid, 0;

    return $CHILD_ERROR == 0;
};

TEST
{
    reset_handles();

    my $pid = $gnupg->wrap_call(
        gnupg_commands     => [qw( --delete-secret-and-public-keys )],
        gnupg_command_args => [qw( 278F850AA702911F1318F0A61B913CE9B6747DDC )],
        handles            => $handles,
    );

    waitpid $pid, 0;

    return $CHILD_ERROR == 0;
};