summaryrefslogtreecommitdiffstats
path: root/regress/regress.pl
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-03-08 22:54:22 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-03-08 22:54:22 +0000
commiteb74e0f0e616a89f769432b7f4c31856c1a37f49 (patch)
treefab71235e5595f9027cea5153f6d0f3dd6de3c0e /regress/regress.pl
parentaed548e3b22772365ac5fdaf6cdb29f7b2b1b126 (diff)
downloadmandoc-eb74e0f0e616a89f769432b7f4c31856c1a37f49.tar.gz
Now that markdown output is tested for almost everything, test all
input files in -T markdown output mode by default and only mark those files with SKIP_MARKDOWN that are not to be tested. Much easier to read, and almost minus 40 lines of Makefile code.
Diffstat (limited to 'regress/regress.pl')
-rwxr-xr-xregress/regress.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/regress/regress.pl b/regress/regress.pl
index 9ebbdf5e..ce384b52 100755
--- a/regress/regress.pl
+++ b/regress/regress.pl
@@ -163,7 +163,7 @@ my @mandoc = '../mandoc';
my @subdir_names;
my (@regress_testnames, @utf8_testnames, @lint_testnames);
my (@html_testnames, @markdown_testnames);
-my (%skip_ascii, %skip_man);
+my (%skip_ascii, %skip_man, %skip_markdown);
push @mandoc, split ' ', $vars{MOPTS} if $vars{MOPTS};
delete $vars{MOPTS};
@@ -206,12 +206,17 @@ if (defined $vars{SKIP_TMAN}) {
$skip_man{$_} = 1 for split ' ', $vars{SKIP_TMAN};
delete $vars{SKIP_TMAN};
}
+if (defined $vars{SKIP_MARKDOWN}) {
+ $skip_markdown{$_} = 1 for split ' ', $vars{SKIP_MARKDOWN};
+ delete $vars{SKIP_MARKDOWN};
+}
if (keys %vars) {
my @vars = keys %vars;
die "unknown var(s) @vars";
}
map { $skip_ascii{$_} = 1; } @regress_testnames if $skip_ascii{ALL};
map { $skip_man{$_} = 1; } @regress_testnames if $skip_man{ALL};
+map { $skip_markdown{$_} = 1; } @regress_testnames if $skip_markdown{ALL};
# --- run targets ------------------------------------------------------
@@ -307,12 +312,12 @@ for my $testname (@html_testnames) {
}
my $count_markdown = 0;
-for my $testname (@markdown_testnames) {
+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}) {
+ if ($targets{markdown} && !$skip_markdown{$testname}) {
$count_markdown++;
$count_total++;
print "@mandoc -T markdown $i\n" if $targets{verbose};