X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2F99-policy.t;h=353e40c631de9d458957cb52ece03d9d8e58f988;hb=37e92c220a54636ebc7900cd59ec6ce56790ede8;hp=1980e342fa812e0ad02f6f4219c782e62a316a7f;hpb=ed1f84b4e8f626245995ecda5afcf83092c153b2;p=freeside.git diff --git a/rt/t/99-policy.t b/rt/t/99-policy.t index 1980e342f..353e40c63 100644 --- a/rt/t/99-policy.t +++ b/rt/t/99-policy.t @@ -21,13 +21,14 @@ sub check { my %check = ( strict => 0, warnings => 0, + no_tabs => 0, shebang => 0, exec => 0, bps_tag => 0, @_, ); - if ($check{strict} or $check{warnings} or $check{shebang} or $check{bps_tag}) { + if ($check{strict} or $check{warnings} or $check{shebang} or $check{bps_tag} or $check{no_tabs}) { local $/; open my $fh, '<', $file or die $!; my $content = <$fh>; @@ -98,4 +99,21 @@ check( $_, exec => -1 ) for grep {m{^t/data/}} @files; check( $_, exec => -1, bps_tag => -1 ) + for grep {m{^etc/[^/]+$}} @files; + +check( $_, exec => -1, bps_tag => -1 ) for grep {m{^etc/upgrade/[^/]+/}} @files; + +check( $_, warnings => 1, strict => 1, compile_perl => 1, no_tabs => 1 ) + for grep {m{^etc/upgrade/.*/content$}} @files; + +check( $_, shebang => 1, exec => 1, warnings => 1, strict => 1, bps_tag => 1, no_tabs => 1 ) + for grep {m{^etc/upgrade/[^/]+$}} @files; + +check( $_, compile_perl => 1, exec => 1 ) + for grep{ -f $_} map {s/\.in$//; $_} grep {m{^etc/upgrade/[^/]+$}} @files; + +check( $_, exec => -1 ) + for grep {m{^(devel/)?docs/}} @files; + +done_testing;