From ebe5be1d0656b52727ffcdb2cd4c9d15b7a582e4 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Thu, 8 Mar 2018 23:33:33 +0100 Subject: [PATCH] tests: verify executable flag for plugins with shebang --- t/test.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/test.t b/t/test.t index 7f2b5fc9..86b76b95 100644 --- a/t/test.t +++ b/t/test.t @@ -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(