5 use File::Temp qw/tempdir/;
6 use Test::More tests => 5;
7 BEGIN { use_ok('Apache2::AuthzCaps', qw/setcap hascaps/) };
9 $Apache2::AuthzCaps::rootdir = tempdir CLEANUP => 1;
12 my ($user, $testname, @caps) = @_;
13 ok hascaps ($user, @caps), $testname
17 my ($user, $testname, @caps) = @_;
18 ok !(hascaps $user, @caps), $testname
21 setcap marius => dostuff => 1;
22 checkcaps marius => 'Set cap and check it', qw/dostuff/;
23 checknocaps marius => 'Check an inexistent cap', qw/dootherstuff/;
25 setcap marius => goaway => 1;
26 checkcaps marius => 'Check multiple caps', qw/dostuff goaway/;
27 setcap marius => goaway => 0;
28 checknocaps marius => 'Remove cap', qw/dostuff goaway/;