From 58498583c994c8d80436c029c02d92bf193cd25f Mon Sep 17 00:00:00 2001 From: Dirk Wetter Date: Mon, 13 Jan 2020 23:50:14 +0100 Subject: [PATCH] Modified LFs --- t/01_testssl_banner.t | 2 +- t/05_ca_hashes_up_to_date.t | 6 +++--- t/07_isJSON_valid.t | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/t/01_testssl_banner.t b/t/01_testssl_banner.t index 7a3ccea..a60ba42 100755 --- a/t/01_testssl_banner.t +++ b/t/01_testssl_banner.t @@ -17,7 +17,7 @@ my $error_regexp5='(syntax error|unexpected token)'; # my $good_regexp='free software.*USAGE w/o ANY WARRANTY.*OWN RISK.*Using.*ciphers.*built(.*)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\" 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`; my $retval=$?; diff --git a/t/05_ca_hashes_up_to_date.t b/t/05_ca_hashes_up_to_date.t index 722a312..33d64b8 100755 --- a/t/05_ca_hashes_up_to_date.t +++ b/t/05_ca_hashes_up_to_date.t @@ -3,7 +3,7 @@ use strict; use Test::More tests => 1; - +printf "\n%s\n", "Testing whether CA certificates are newer than \"~/etc/ca_hashes.txt\" ..."; my $newer_bundles=`find etc/*.pem -newer etc/ca_hashes.txt`; -is($newer_bundles,"","List of CA bundles newer then etc/ca_hashes.txt should be empty. If not run utils/create_ca_hashes.sh"); -done_testing; \ No newline at end of file +is($newer_bundles,"","List of CA bundles newer then etc/ca_hashes.txt should be empty. If not run utils/create_ca_hashes.sh"); +done_testing; diff --git a/t/07_isJSON_valid.t b/t/07_isJSON_valid.t index b6b3399..9acd953 100755 --- a/t/07_isJSON_valid.t +++ b/t/07_isJSON_valid.t @@ -21,8 +21,10 @@ die "Unable to open $prg" unless -f $prg; my $uri="cloudflare.com"; +printf "\n%s", "Unit testing JSON output ..."; + #1 -printf "\n%s\n", "Unit testing plain JSON output --> $uri ..."; +printf "%s\n", ".. plain JSON output --> $uri "; $out = `./testssl.sh $check2run --jsonfile tmp.json $uri`; $json = json('tmp.json'); unlink 'tmp.json'; @@ -31,7 +33,7 @@ is(@errors,0,"no errors"); $tests++; #2 -printf "\n%s\n", "Unit testing pretty JSON output --> $uri ..."; +printf "%s\n", ".. pretty JSON output --> $uri "; $out = `./testssl.sh $check2run --jsonfile-pretty tmp.json $uri`; $json = json('tmp.json'); unlink 'tmp.json'; @@ -43,7 +45,7 @@ $tests++; #3 # This testss.sh run deliberately does NOT work as travis-ci.org blocks port 25 egress. # but the output should be fine. The idea is to have a unit test for a failed connection. -printf "\n%s\n", "Checking plain JSON output for a failed run '--mx $uri' ..."; +printf "%s\n", ".. plain JSON output for a failed run '--mx $uri' ..."; $out = `./testssl.sh --ssl-native --openssl-timeout=10 $check2run --jsonfile tmp.json --mx $uri`; $json = json('tmp.json'); unlink 'tmp.json'; @@ -53,7 +55,7 @@ $tests++; #4 # Same as above but with pretty JSON -printf "\n%s\n", "Checking pretty JSON output for a failed run '--mx $uri' ..."; +printf "%s\n", ".. pretty JSON output for a failed run '--mx $uri' ..."; $out = `./testssl.sh --ssl-native --openssl-timeout=10 $check2run --jsonfile-pretty tmp.json --mx $uri`; $json = json('tmp.json'); unlink 'tmp.json'; @@ -63,7 +65,7 @@ $tests++; #5 my $uri = "smtp-relay.gmail.com:587"; -printf "\n%s\n", " Unit testing plain JSON output --> $uri ..."; +printf "%s\n", " .. plain JSON output --> $uri ..."; $out = `./testssl.sh --jsonfile tmp.json $check2run -t smtp $uri`; $json = json('tmp.json'); unlink 'tmp.json';