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:
@ -17,27 +17,34 @@ my $error_regexp5='(syntax error|unexpected token)';
|
|||||||
my $good_regexp='free software([\s\S]*)USAGE w/o ANY WARRANTY([\s\S]*)OWN RISK([\s\S]*)Using([\s\S]*)ciphers([\s\S]*)built([\s\S]*)platform';
|
my $good_regexp='free software([\s\S]*)USAGE w/o ANY WARRANTY([\s\S]*)OWN RISK([\s\S]*)Using([\s\S]*)ciphers([\s\S]*)built([\s\S]*)platform';
|
||||||
|
|
||||||
printf "\n%s\n", "Testing whether just calling \"./testssl.sh --banner\" produces no error ...";
|
printf "\n%s\n", "Testing whether just calling \"./testssl.sh --banner\" produces no error ...";
|
||||||
$fileout = `timeout 10 bash ./testssl.sh --banner 2>&1`;
|
$fileout = `bash ./testssl.sh --banner 2>&1`;
|
||||||
my $retval=$?;
|
my $retval=$?;
|
||||||
|
|
||||||
|
#1
|
||||||
unlike($fileout, qr/$error_regexp1/, "regex 1");
|
unlike($fileout, qr/$error_regexp1/, "regex 1");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#2
|
||||||
unlike($fileout, qr/$error_regexp2/, "regex 2");
|
unlike($fileout, qr/$error_regexp2/, "regex 2");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#3
|
||||||
unlike($fileout, qr/$error_regexp3/, "regex 3");
|
unlike($fileout, qr/$error_regexp3/, "regex 3");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#4
|
||||||
unlike($fileout, qr/$error_regexp4/, "regex 4");
|
unlike($fileout, qr/$error_regexp4/, "regex 4");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#5
|
||||||
unlike($fileout, qr/$error_regexp5/, "regex 5");
|
unlike($fileout, qr/$error_regexp5/, "regex 5");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#6
|
||||||
like($fileout, qr/$good_regexp/, "regex positive");
|
like($fileout, qr/$good_regexp/, "regex positive");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
#7
|
||||||
is($retval, 0, "return value should be equal zero: \"$retval\"");
|
is($retval, 0, "return value should be equal zero: \"$retval\"");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user