Skip to content

Commit b4c9437

Browse files
authored
Merge pull request #1741 from drwetter/intermediate_cert_improvements
Intermediate cert improvements
2 parents 3d07f55 + 4ca4e07 commit b4c9437

2 files changed

Lines changed: 285 additions & 198 deletions

File tree

t/08_isHTML_valid.t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use strict;
77
use Test::More;
88
use Data::Dumper;
9+
use Text::Diff;
910

1011
my $tests = 0;
1112
my $prg="./testssl.sh";
@@ -15,7 +16,7 @@ my $html="";
1516
my $debughtml="";
1617
my $edited_html="";
1718
my $check2run="--ip=one --color 0 --htmlfile tmp.html";
18-
19+
my $diff="";
1920
die "Unable to open $prg" unless -f $prg;
2021

2122
printf "\n%s\n", "Doing HTML output checks";
@@ -47,6 +48,9 @@ $edited_html =~ s/'/'/g;
4748
cmp_ok($edited_html, "eq", $out, "HTML file matches terminal output");
4849
$tests++;
4950

51+
$diff = diff \$edited_html, \$out;
52+
printf "\n%s\n", "$diff";
53+
5054
#2
5155
printf "\n%s\n", " .. running again $prg against \"$uri\", now with --debug 4 to create HTML output (may take another ~2 minutes)";
5256
# Redirect stderr to /dev/null in order to avoid some unexplained "date: invalid date" error messages
@@ -72,5 +76,10 @@ $debughtml =~ s/.*DEBUG:.*\n//g;
7276
cmp_ok($debughtml, "eq", $html, "HTML file created with --debug 4 matches HTML file created without --debug");
7377
$tests++;
7478

79+
$diff = diff \$debughtml, \$html;
80+
printf "\n%s\n", "$diff";
81+
82+
83+
7584
printf "\n";
7685
done_testing($tests);

0 commit comments

Comments
 (0)