]> git.saurik.com Git - apple/security.git/blame - SecurityTests/regressions/t/41kc-unlock-referral.t
Security-57337.40.85.tar.gz
[apple/security.git] / SecurityTests / regressions / t / 41kc-unlock-referral.t
CommitLineData
d8f41ccd
A
1#!/usr/bin/perl -w
2
3use strict;
4use warnings;
5BEGIN { require 't/security.pl' };
6plan_security tests => 7;
7
8$ENV{HOME}="/tmp/test$$";
9ok(mkdir($ENV{HOME}), 'setup home');
10my $source = "$ENV{HOME}/source";
11my $dest = "$ENV{HOME}/dest";
12is_output('security', 'create-keychain', ['-p', 'test', $source],
13 [],
14 'create source');
15is_output('security', 'create-keychain', ['-p', 'test', $dest],
16 [],
17 'create dest');
18SKIP: {
19 skip "systemkeychain brings up UI", 1;
20
21 is_output('systemkeychain', '-k', [$dest, '-s', $source],
22 [],
23 'systemkeychain');
24}
25is_output('security', 'lock-keychain', [$source],
26 [],
27 'lock source');
28SKIP: {
29 skip "systemkeychain bring up UI", 1;
30
31 is_output('security', 'unlock-keychain', ['-u', $source],
32 [],
33 'unlock source w/ referal');
34}
35ok(system("rm -rf '$ENV{HOME}'") eq 0, 'cleanup home');
36
371;