File: 3-verify.t

package info (click to toggle)
libmodule-signature-perl 0.73-1%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 452 kB
  • ctags: 251
  • sloc: perl: 2,176; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!perl

use strict;
use File::Spec;
use Test::More;
use IPC::Run qw(run);
plan tests => 4;

$|=1;
sub _f ($) {File::Spec->catfile(split /\//, shift);}
0 == system $^X, _f"t/wrap.pl", "-x" or die;
for my $tdir (glob("t/test-dat*")) {
    chdir $tdir or die;
    my @system = ($^X, "-I../../lib/", "../../script/cpansign", "-v");
    my($in,$out,$err);
    run \@system, \$in, \$out, \$err;
    my $ret = $?;
    close $out;
    my $diff = join "\n", grep /^.SHA1/, split /\n/, $out;
    ok(0==$ret, "dir[$tdir]system[@system]ret[$ret]out[$out]err[$err]diff[$diff]");
    chdir "../../" or die;
}