Reindent everything
[apache2-authzcaps.git] / t / Apache2-AuthzCaps.t
1 use v5.14;
2 use strict;
3 use warnings;
4
5 use File::Temp qw/tempdir/;
6 use Test::More tests => 5;
7 BEGIN { use_ok('Apache2::AuthzCaps', qw/setcap hascaps/) };
8
9 $Apache2::AuthzCaps::rootdir = tempdir CLEANUP => 1;
10
11 sub checkcaps{
12 my ($user, $testname, @caps) = @_;
13 ok hascaps ($user, @caps), $testname
14 }
15
16 sub checknocaps{
17 my ($user, $testname, @caps) = @_;
18 ok !(hascaps $user, @caps), $testname
19 }
20
21 setcap marius => dostuff => 1;
22 checkcaps marius => 'Set cap and check it', qw/dostuff/;
23 checknocaps marius => 'Check an inexistent cap', qw/dootherstuff/;
24
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/;
This page took 0.020924 seconds and 4 git commands to generate.