diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-08-17 18:42:08 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-08-17 18:42:08 +0000 |
commit | 7b8dd0a4ebf96c87a16d09fb8a7abd1070f8c229 (patch) | |
tree | ef0f90b8cca309eae2a2fafa9b81277959aac3ca /regress | |
parent | 4967ec34e935bbdb556149a85f379cfdfbed2173 (diff) |
Segfault fixes from kristaps@.
Note that .It and .Nm blocks without bodies cannot be generated by
valid mdoc(7) syntax but are a adequate representations of invalid
mdoc(7) constructs like Bl -hang It Bo Sh and Sh SYNOPSIS Nm Bo Sh.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bl/break.in | 5 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bl/break.out_ascii | 3 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bl/break.out_lint | 3 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Nm/Makefile | 20 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Nm/break.in | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Nm/break.out_ascii | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Nm/break.out_lint | 1 |
7 files changed, 52 insertions, 4 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/break.in b/regress/usr.bin/mandoc/mdoc/Bl/break.in index 478b8abc370..a397042d27b 100644 --- a/regress/usr.bin/mandoc/mdoc/Bl/break.in +++ b/regress/usr.bin/mandoc/mdoc/Bl/break.in @@ -24,3 +24,8 @@ inside both after display .Ed after both +.Sh CAVEATS +.Bl -hang +.It before broken block Bo inside both +.El +after list diff --git a/regress/usr.bin/mandoc/mdoc/Bl/break.out_ascii b/regress/usr.bin/mandoc/mdoc/Bl/break.out_ascii index f505cb79f35..bc3e2769440 100644 --- a/regress/usr.bin/mandoc/mdoc/Bl/break.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Bl/break.out_ascii @@ -15,4 +15,7 @@ EEXXAAMMPPLLEESS inside both after display after both +CCAAVVEEAATTSS + before broken block [inside both after list] + OpenBSD November 16, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Bl/break.out_lint b/regress/usr.bin/mandoc/mdoc/Bl/break.out_lint index 79eade5f655..b99744f21b2 100644 --- a/regress/usr.bin/mandoc/mdoc/Bl/break.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Bl/break.out_lint @@ -1,2 +1,5 @@ mandoc: break.in:13:2: WARNING: blocks badly nested: El breaks Bo mandoc: break.in:23:2: WARNING: blocks badly nested: El breaks Bd +mandoc: break.in:30:2: WARNING: blocks badly nested: El breaks It +mandoc: break.in:29:25: ERROR: appending missing end of block: Bo +mandoc: break.in:28:2: ERROR: appending missing end of block: Bl diff --git a/regress/usr.bin/mandoc/mdoc/Nm/Makefile b/regress/usr.bin/mandoc/mdoc/Nm/Makefile index 8ec5dd751d2..02342262c48 100644 --- a/regress/usr.bin/mandoc/mdoc/Nm/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Nm/Makefile @@ -1,9 +1,21 @@ -# $OpenBSD: Makefile,v 1.8 2014/08/11 04:18:18 schwarze Exp $ +# $OpenBSD: Makefile,v 1.9 2014/08/17 18:42:07 schwarze Exp $ -REGRESS_TARGETS = empty font emptyNAME emptyNAMEuse badNAME badNAMEuse long +REGRESS_TARGETS = badNAME badNAMEuse break empty emptyNAME emptyNAMEuse +REGRESS_TARGETS += font long -LINT_TARGETS = badNAME badNAMEuse +LINT_TARGETS = badNAME badNAMEuse break -SKIP_GROFF = emptyNAMEuse badNAMEuse +# groff-1.22.2/mandoc difference: +# When the first Nm does not have an argument but a later one has, +# mandoc retroactively uses the later name for the earlier instances +# of Nm, too, while groff does not. + +SKIP_GROFF = badNAMEuse emptyNAMEuse + +# groff-1.22.2 defect: +# When a SYNOPSIS Nm block head breaks a sub block, all the +# remaining content in the document gets lost. + +SKIP_GROFF += break .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/mdoc/Nm/break.in b/regress/usr.bin/mandoc/mdoc/Nm/break.in new file mode 100644 index 00000000000..203ba98e3c5 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Nm/break.in @@ -0,0 +1,12 @@ +.Dd August 17, 2014 +.Dt NM-BREAK 1 +.Os OpenBSD +.Sh NAME +.Nm Nm-break +.Nd name block head breaking another block +.Sh SYNOPSIS +.Nm before Bo within +.Sh DESCRIPTION +initial text +.Nm +final text diff --git a/regress/usr.bin/mandoc/mdoc/Nm/break.out_ascii b/regress/usr.bin/mandoc/mdoc/Nm/break.out_ascii new file mode 100644 index 00000000000..8c62c9f7d3c --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Nm/break.out_ascii @@ -0,0 +1,12 @@ +NM-BREAK(1) OpenBSD Reference Manual NM-BREAK(1) + +NNAAMMEE + NNmm--bbrreeaakk - name block head breaking another block + +SSYYNNOOPPSSIISS + bbeeffoorree [[wwiitthhiinn]] + +DDEESSCCRRIIPPTTIIOONN + initial text NNmm--bbrreeaakk final text + +OpenBSD August 17, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Nm/break.out_lint b/regress/usr.bin/mandoc/mdoc/Nm/break.out_lint new file mode 100644 index 00000000000..409b5812ae8 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Nm/break.out_lint @@ -0,0 +1 @@ +mandoc: break.in:9:2: ERROR: inserting missing end of block: Sh breaks Bo |