File: Interface.t

package info (click to toggle)
libgnupg-interface-perl 1.04-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 824 kB
  • sloc: perl: 3,828; makefile: 6; sh: 5
file content (37 lines) | stat: -rw-r--r-- 755 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
#!/usr/bin/perl -w
#
# $Id: Interface.t,v 1.1 2001/04/30 02:04:25 ftobin Exp $
#

use strict;

use lib './t';
use MyTest;

# Make sure that there are some dummy scripts available so no warnings
# are thrown.
$ENV{PATH} .= ":t/bin";

use GnuPG::Interface;

my $v1 = './test/fake-gpg-v1';
my $v2 = './test/fake-gpg-v2';

my $gnupg = GnuPG::Interface->new( call => $v1 );

# deprecation test
TEST
{
    $gnupg->gnupg_call() eq $v1;
};

# deprecation test
TEST
{
    # Setting the program to call now calls the program to
    # determine the version, but if gnupg doesn't exist we
    # can't run it. Since we're just checking that call()
    # has changed, let setting the variable fail.
    eval { $gnupg->gnupg_call( $v2 ) };
    $gnupg->call() eq $v2;
};