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