mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Merge pull request #2042 from dcooper16/check_file_permissions
Check file permissions on ./testssl.sh
This commit is contained in:
commit
92a0da1d75
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
|
use File::stat;
|
||||||
|
|
||||||
my $tests = 0;
|
my $tests = 0;
|
||||||
my $fileout="";
|
my $fileout="";
|
||||||
@ -20,6 +21,15 @@ my $error_regexp4='command not found';
|
|||||||
my $error_regexp5='(syntax error|unexpected token)';
|
my $error_regexp5='(syntax error|unexpected token)';
|
||||||
|
|
||||||
printf "\n%s\n", "Testing whether just calling \"./testssl.sh\" produces no error ...";
|
printf "\n%s\n", "Testing whether just calling \"./testssl.sh\" produces no error ...";
|
||||||
|
my $info = stat($prg);
|
||||||
|
my $retMode = $info->mode;
|
||||||
|
|
||||||
|
is($retMode & 0400, 0400, "Checking \"./testssl.sh\" for read permission");
|
||||||
|
$tests++;
|
||||||
|
|
||||||
|
is($retMode & 0100, 0100, "Checking \"./testssl.sh\" for execute permission");
|
||||||
|
$tests++;
|
||||||
|
|
||||||
$fileout = `timeout 10 bash $prg 2>&1`;
|
$fileout = `timeout 10 bash $prg 2>&1`;
|
||||||
my $retval=$?;
|
my $retval=$?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user