tests: verify executable flag for plugins with shebang

This commit is contained in:
Lars Kruse 2018-03-08 23:33:33 +01:00
parent 29e6f53cad
commit ebe5be1d06
1 changed files with 8 additions and 1 deletions

View File

@ -48,7 +48,14 @@ sub process_file {
my ( $file, $filename, $interpreter, $arguments ) = @_;
use v5.10.1;
if ( $interpreter =~ m{/bin/sh} ) {
if ( ! -x $file ) {
# missing executable flag
diag(
sprintf("\nFile '%s' lacks executable permission bits. Maybe try 'chmod +x $file'?\n",
$file)
);
}
elsif ( $interpreter =~ m{/bin/sh} ) {
subtest $filename => sub {
plan tests => 2;
run_check(