+my $count_markdown = 0;
+for my $testname (@regress_testnames) {
+ next if $onlytest && $testname ne $onlytest;
+ my $i = "$subdir/$testname.in";
+ my $o = "$subdir/$testname.mandoc_markdown";
+ my $w = "$subdir/$testname.out_markdown";
+ if ($targets{markdown} && !$skip_markdown{$testname}) {
+ $count_markdown++;
+ $count_total++;
+ print "@mandoc -T markdown $i\n" if $targets{verbose};
+ sysout $o, @mandoc, qw(-T markdown), $i
+ and fail $subdir, $testname, 'markdown:mandoc';
+ system @diff, $w, $o
+ and fail $subdir, $testname, 'markdown:diff';
+ }
+ if ($targets{clean}) {
+ print "rm $o\n" if $targets{verbose};
+ unlink $o;
+ }
+}
+