Skip to content

Commit f3ebf0e

Browse files
committed
Add autoflush thingy for MAcOS
1 parent 853da2a commit f3ebf0e

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

t/32_isHTML_valid.t

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,20 @@ my $htmlfile="tmp.html";
2020
# Pick /usr/bin/openssl as we want to avoid the debug messages like "Your ./bin/openssl.Linux.x86_64 doesn't support X25519"
2121
my $diff="";
2222
my $ip="";
23+
24+
2325
die "Unable to open $prg" unless -f $prg;
2426

2527
printf "\n%s\n", "Doing HTML output checks";
28+
29+
# useful against "failed to flush stdout" messages
30+
STDOUT->autoflush(1);
31+
32+
33+
# Provide proper start conditions
2634
unlink $htmlfile;
2735

36+
2837
#1
2938
printf "%s\n", " .. running $prg against \"$uri\" to create HTML and terminal outputs (may take ~2 minutes)";
3039
# specify a TERM_WIDTH so that the two calls to testssl.sh don't create HTML files with different values of TERM_WIDTH

t/33_isJSON_severitylevel_valid.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ printf "\n%s\n", "Doing severity level checks";
2424
die "Unable to open $prg" unless -f $prg;
2525
unlink 'tmp.json';
2626

27+
# useful against "failed to flush stdout" messages
28+
STDOUT->autoflush(1);
29+
2730
#1
2831
pass(" .. running testssl.sh against $uri to create a JSON report with severity level >= LOW (may take 2~3 minutes)"); $tests++;
2932
$out = `$prg $check2run --jsonfile tmp.json $uri`;

t/51_badssl.com.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ my (
2020

2121
die "Unable to open $prg" unless -f $prg;
2222

23+
# useful against "failed to flush stdout" messages
24+
STDOUT->autoflush(1);
25+
2326
# Provide proper start conditions
2427
unlink 'tmp.json';
2528

0 commit comments

Comments
 (0)