]>
git.saurik.com Git - apple/security.git/blob - SecurityTests/regressions/t/security.pl
6 return unless $$ == $pid;
7 rm_test
($_) for @TOCLEAN;
18 plan skip_all
=> "security not installed";
27 return unless $$ == $pid;
28 $SIG{__WARN__
} = sub { 1 };
29 cleanup_test
($_) for @TOCLEAN;
35 my $xd = "/tmp/test-$pid";
36 my $security = 'security';
38 push @TOCLEAN, [$xd, $security];
39 return ($xd, $security);
43 my ($xd, $security) = @{+shift};
48 return unless $ENV{TEST_VERBOSE
};
49 my ($xd, $security) = @{+shift};
53 my ($security, $cmd, $arg, $expected, $test) = @_;
55 run3
([$security, $cmd, @$arg], \
undef, \
$output, \
$output);
56 # open(STDOUT, ">&STDERR") || die "couldn't dup strerr: $!";
57 # open(my $out, '-|', $security, $cmd, @$arg);
58 # while (<$out>) { $output .= $_; }
60 my $cmp = (grep {ref ($_) eq 'Regexp'} @$expected)
61 ? \
&is_deeply_like
: \
&is_deeply
;
62 @_ = ([sort split (/\r?\n/, $output)], [sort @$expected], $test || join(' ', $cmd, @$arg));