mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-09-02 01:58:28 +02:00
Number each check / make it work under MacOS
This commit is contained in:
@ -24,33 +24,42 @@ printf "\n%s\n", "Testing whether just calling \"./testssl.sh\" produces no erro
|
|||||||
my $info = stat($prg);
|
my $info = stat($prg);
|
||||||
my $retMode = $info->mode;
|
my $retMode = $info->mode;
|
||||||
|
|
||||||
|
#1
|
||||||
is($retMode & 0400, 0400, "Checking \"./testssl.sh\" for read permission");
|
is($retMode & 0400, 0400, "Checking \"./testssl.sh\" for read permission");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#2
|
||||||
is($retMode & 0100, 0100, "Checking \"./testssl.sh\" for execute permission");
|
is($retMode & 0100, 0100, "Checking \"./testssl.sh\" for execute permission");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
$fileout = `timeout 10 bash $prg 2>&1`;
|
$fileout = `bash $prg 2>&1`;
|
||||||
my $retval=$?;
|
my $retval=$?;
|
||||||
|
|
||||||
|
#3
|
||||||
unlike($fileout, qr/$error_regexp1/, "regex 1");
|
unlike($fileout, qr/$error_regexp1/, "regex 1");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#4
|
||||||
unlike($fileout, qr/$error_regexp2/, "regex 2");
|
unlike($fileout, qr/$error_regexp2/, "regex 2");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#5
|
||||||
unlike($fileout, qr/$error_regexp3/, "regex 3");
|
unlike($fileout, qr/$error_regexp3/, "regex 3");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#6
|
||||||
unlike($fileout, qr/$error_regexp4/, "regex 4");
|
unlike($fileout, qr/$error_regexp4/, "regex 4");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#7
|
||||||
unlike($fileout, qr/$error_regexp5/, "regex 5");
|
unlike($fileout, qr/$error_regexp5/, "regex 5");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#8
|
||||||
is($retval, 0, "return value should be equal zero: \"$retval\"");
|
is($retval, 0, "return value should be equal zero: \"$retval\"");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#9
|
||||||
$out=`grep -E "$debug_regexp" $prg`;
|
$out=`grep -E "$debug_regexp" $prg`;
|
||||||
unlike($out, qr/$debug_regexp/, "Debug RegEx");
|
unlike($out, qr/$debug_regexp/, "Debug RegEx");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
Reference in New Issue
Block a user