=================================================================== RCS file: /cvs/mandoc/regress/regress.pl,v retrieving revision 1.10 retrieving revision 1.12 diff -u -p -r1.10 -r1.12 --- mandoc/regress/regress.pl 2019/03/10 09:23:33 1.10 +++ mandoc/regress/regress.pl 2019/09/03 18:19:37 1.12 @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -# $Id: regress.pl,v 1.10 2019/03/10 09:23:33 schwarze Exp $ +# $Id: regress.pl,v 1.12 2019/09/03 18:19:37 schwarze Exp $ # # Copyright (c) 2017 Ingo Schwarze # @@ -86,8 +86,12 @@ sub syshtml ($@) { if (!$state && s/.*//) { $state = 'math'; next unless length; - } elsif (/^BEGINTEST/) { + } elsif (/BEGINTEST/) { $state = 'other'; + next; + } elsif (/ENDTEST/) { + $state = 0; + next; } if ($state eq 'math') { s/^ *//; @@ -98,7 +102,6 @@ sub syshtml ($@) { } } print $outfd "$_\n" if $state; - $state = 0 if /^ENDTEST/; } close $outfd; close $infd; @@ -424,7 +427,7 @@ if ($count_total == 1) { print "\n"; } else { print "No tests were run.\n"; -} +} if ($targets{clean}) { if ($count_rm) { print "Deleted $count_rm test output files.\n";