# $OpenBSD: Makefile.inc,v 1.3 2015/02/03 19:37:25 schwarze Exp $
SKIP_TMAN ?= ALL
+SKIP_MARKDOWN ?= ALL
.include "../Makefile.inc"
SKIP_GROFF ?= ${REGRESS_TARGETS}
SKIP_TMAN ?= ALL
+SKIP_MARKDOWN ?= ALL
# OpenBSD only: maintainer targets and custom extraction
# $OpenBSD: Makefile.inc,v 1.3 2015/02/03 19:37:25 schwarze Exp $
SKIP_TMAN ?= ALL
+SKIP_MARKDOWN ?= ALL
.include "../Makefile.inc"
REGRESS_TARGETS = noarg font
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = noarg font
.include <bsd.regress.mk>
REGRESS_TARGETS = break
LINT_TARGETS = break
-MARKDOWN_TARGETS = break
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.2 2012/11/16 18:40:39 schwarze Exp $
REGRESS_TARGETS = middle eos
-MARKDOWN_TARGETS = middle eos
.include <bsd.regress.mk>
REGRESS_TARGETS = author empty
UTF8_TARGETS = author empty
-MARKDOWN_TARGETS = author empty
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
REGRESS_TARGETS = punct font
-MARKDOWN_TARGETS = punct font
.include <bsd.regress.mk>
REGRESS_TARGETS = invalid
LINT_TARGETS = invalid
-MARKDOWN_TARGETS = invalid
.include <bsd.regress.mk>
LINT_TARGETS = beforeNAME blank nested badargs break broken unclosed
-MARKDOWN_TARGETS = beforeNAME blank centered nested spacing
-MARKDOWN_TARGETS += badargs empty offset-empty offset-neg
-MARKDOWN_TARGETS += break broken unclosed
-
SKIP_TMAN = beforeNAME centered
# groff-1.22.3 defects:
REGRESS_TARGETS = nest multiargs badargs break broken
LINT_TARGETS = multiargs badargs break broken
+# mandoc -T markdown ignores .Bf, at least for now
+
+SKIP_MARKDOWN ?= ALL
+
# groff-1.22.2 defects:
# - If the first argument to .Bf is a bad one,
# no block is opened at all and the .Ef causes another error.
SKIP_TMAN ?= badarg
+# mandoc -T markdown output of .Bk is quite ugly,
+# so refrain from testing it for now
+
+SKIP_MARKDOWN ?= ALL
+
.include <bsd.regress.mk>
LINT_TARGETS += empty noIt emptyhead emptytag emptyitem
LINT_TARGETS += bareIt bareTa break breakingIt broken
-MARKDOWN_TARGETS = item inset diag ohang bullet dash enum hang tag
-MARKDOWN_TARGETS += column colNoIt extend nested offset secstart
-MARKDOWN_TARGETS += notype multitype badargs
-MARKDOWN_TARGETS += empty noIt emptyhead emptytag emptyitem multitag
-MARKDOWN_TARGETS += bareIt bareTa unclosed breakingIt breakingTa broken
-
# groff-mandoc differences:
# - groff allows enclosures to span Ta, mandoc does not
SKIP_TMAN += emptyhead emptytag
+# mandoc -T markdown still has issues with badly nested lists
+
+SKIP_MARKDOWN ?= break
+
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.1.1.1 2011/12/04 03:09:25 schwarze Exp $
REGRESS_TARGETS = empty
-MARKDOWN_TARGETS = empty
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
REGRESS_TARGETS = args
-MARKDOWN_TARGETS = args
.include <bsd.regress.mk>
REGRESS_TARGETS = noarg font eos
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = noarg font eos
.include <bsd.regress.mk>
REGRESS_TARGETS = basic font noarg
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = basic font noarg
.include <bsd.regress.mk>
REGRESS_TARGETS = spacing
LINT_TARGETS = spacing
-MARKDOWN_TARGETS = spacing
.include <bsd.regress.mk>
REGRESS_TARGETS = args
LINT_TARGETS = args
+# mandoc -T markdown ignores .Db
+
+SKIP_MARKDOWN ?= ALL
+
.include <bsd.regress.mk>
REGRESS_TARGETS = badarg dupe late long manarg noarg order
LINT_TARGETS = badarg dupe late long manarg noarg order
-MARKDOWN_TARGETS = badarg dupe late long manarg order
+
+# noarg output contains the date when the file is formatted
+
+SKIP_ASCII ?= noarg
+SKIP_MARKDOWN ?= noarg
# If groff finds exactly three arguments, it assumes they are month,
# day and year without further checking. If there are no arguments,
# That is not at all sane behaviour, we are not going to imitate it.
SKIP_GROFF = badarg long manarg noarg
-SKIP_ASCII = noarg
# Autodetection fails for late .Dd, so specify -mdoc explicitly.
REGRESS_TARGETS = spacing
LINT_TARGETS = spacing
-MARKDOWN_TARGETS = spacing
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.1.1.1 2011/12/04 03:09:25 schwarze Exp $
REGRESS_TARGETS = empty
-MARKDOWN_TARGETS = empty
.include <bsd.regress.mk>
REGRESS_TARGETS += missing noarg nobody nosec order
LINT_TARGETS = badsec case dupe fourargs late
LINT_TARGETS += missing noarg nobody nosec order
-MARKDOWN_TARGETS = case dupe fourargs late
-MARKDOWN_TARGETS += missing noarg nobody nosec order
SKIP_GROFF = badsec nobody
SKIP_ASCII = badsec
+SKIP_MARKDOWN ?= badsec
# When the section is missing from the man(7) .TH title line,
# empty parentheses are shown in the page header.
REGRESS_TARGETS = font noarg
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = font noarg
.include <bsd.regress.mk>
REGRESS_TARGETS = font noarg punct
LINT_TARGETS = noarg punct
-MARKDOWN_TARGETS = font noarg punct
.include <bsd.regress.mk>
REGRESS_TARGETS = break empty obsolete unclosed
LINT_TARGETS = break obsolete unclosed
-MARKDOWN_TARGETS = break empty obsolete unclosed
# groff-1.22.3 defect:
# - When .Ec is missing, groff prints no page footer.
REGRESS_TARGETS = noarg font
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = noarg font
.include <bsd.regress.mk>
REGRESS_TARGETS = font noarg
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = font noarg
.include <bsd.regress.mk>
REGRESS_TARGETS = args noname nostd
LINT_TARGETS = noname nostd
-MARKDOWN_TARGETS = args noname nostd
# groff-1.22.2 defect:
# - .Ex without -std produces no output
REGRESS_TARGETS = break empty eos font
LINT_TARGETS = empty
SKIP_TMAN = eos
-MARKDOWN_TARGETS = break empty eos font
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.8 2014/08/21 12:56:24 schwarze Exp $
REGRESS_TARGETS = noarg multiarg parsed punct font
-MARKDOWN_TARGETS = noarg multiarg parsed punct font
.include <bsd.regress.mk>
REGRESS_TARGETS = basic break eos font noarg nohead
REGRESS_TARGETS += obsolete punct section warn
LINT_TARGETS = noarg nohead obsolete warn
-MARKDOWN_TARGETS = basic break eos font noarg nohead
-MARKDOWN_TARGETS += obsolete punct section warn
# groff-1.22.3 defects:
# - .Fo without an argument prints unbalanced parentheses
# $OpenBSD: Makefile,v 1.1 2012/07/09 17:52:09 schwarze Exp $
REGRESS_TARGETS = font
-MARKDOWN_TARGETS = font
.include <bsd.regress.mk>
REGRESS_TARGETS = noarg font
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = noarg font
.include <bsd.regress.mk>
REGRESS_TARGETS = break eos font noarg
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = break eos font noarg
.include <bsd.regress.mk>
REGRESS_TARGETS = break badargs eos
LINT_TARGETS = badargs
-MARKDOWN_TARGETS = break badargs eos
.include <bsd.regress.mk>
REGRESS_TARGETS = punct font
LINT_TARGETS = punct
-MARKDOWN_TARGETS = punct font
.include <bsd.regress.mk>
REGRESS_TARGETS = link noarg font
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = link noarg
+
+# it's unclear what font changes in link destinations should do
+
+SKIP_MARKDOWN ?= font
.include <bsd.regress.mk>
REGRESS_TARGETS = noarg font
LINT_TARGETS = noarg
-MARKDOWN_TARGETS = noarg font
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.5 2012/07/09 17:52:09 schwarze Exp $
REGRESS_TARGETS = simple font
-MARKDOWN_TARGETS = simple
+
+# it's unclear what font changes in link destinations should do
+
+SKIP_MARKDOWN ?= font
.include <bsd.regress.mk>
REGRESS_TARGETS = broken hyph noarg par
LINT_TARGETS = broken noarg
-MARKDOWN_TARGETS = hyph noarg par
+
+SKIP_MARKDOWN ?= broken
.include <bsd.regress.mk>
LINT_TARGETS = badNAME badNAMEuse break broken
-MARKDOWN_TARGETS = break broken empty
-MARKDOWN_TARGETS += font long par parns punct
-
# groff-1.22.3/mandoc differences:
# - When the head of an Nm block in the SYNOPSIS is broken by an
# explicit block end macro on the same line, formatting differs,
SKIP_GROFF += break
+SKIP_MARKDOWN ?= badNAME badNAMEuse emptyNAME emptyNAMEuse
+
.include <bsd.regress.mk>
REGRESS_TARGETS = punct spacing
LINT_TARGETS = punct
-MARKDOWN_TARGETS = punct spacing
.include <bsd.regress.mk>
REGRESS_TARGETS = position punct
LINT_TARGETS = position
-MARKDOWN_TARGETS = position punct
.include <bsd.regress.mk>
# $OpenBSD: Makefile,v 1.1 2012/07/07 14:10:55 schwarze Exp $
REGRESS_TARGETS = punct
-MARKDOWN_TARGETS = punct
.include <bsd.regress.mk>
#!/usr/bin/env perl
#
-# $Id: regress.pl,v 1.4 2017/03/05 19:57:39 schwarze Exp $
+# $Id: regress.pl,v 1.5 2017/03/08 22:54:22 schwarze Exp $
#
# Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
#
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};
$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 ------------------------------------------------------
}
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};