diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-06-27 12:17:36 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-06-27 12:17:36 +0000 |
commit | fc3f88d1377c7bffa72b592c383a452c6267a2d1 (patch) | |
tree | 1dc885c67b44f8f19459b1920ca04d616fe24cf9 /regress | |
parent | e42e596c0d7b439f21422d484a24a670984ed0c1 (diff) |
warn about .Ns macros that have no effect because they are followed
by an isolated closing delimiter; inspired by mdoclint
Diffstat (limited to 'regress')
4 files changed, 21 insertions, 4 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Ns/position.in b/regress/usr.bin/mandoc/mdoc/Ns/position.in index 1325df25c5f..56fc5de6b86 100644 --- a/regress/usr.bin/mandoc/mdoc/Ns/position.in +++ b/regress/usr.bin/mandoc/mdoc/Ns/position.in @@ -1,4 +1,4 @@ -.Dd September 15, 2013 +.Dd June 27, 2017 .Dt NS-POSITION 1 .Os OpenBSD .Sh NAME @@ -20,6 +20,12 @@ After some macro and a block closing: In the middle of a macro line: .Oo before Oc Ns Op after .Pp +After closing punctuation: +.Oo before Oc : Ns Op after +.Pp +Before closing punctuation: +.Oo before Oc Ns : Op after +.Pp At the end of a macro line: .Oo before Oc Ns .Op after diff --git a/regress/usr.bin/mandoc/mdoc/Ns/position.out_ascii b/regress/usr.bin/mandoc/mdoc/Ns/position.out_ascii index a2bd6c4583b..26de056232d 100644 --- a/regress/usr.bin/mandoc/mdoc/Ns/position.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Ns/position.out_ascii @@ -12,8 +12,12 @@ DDEESSCCRRIIPPTTIIOONN In the middle of a macro line: [before][after] + After closing punctuation: [before]:[after] + + Before closing punctuation: [before]: [after] + At the end of a macro line: [before][after] At the end of partial implicit: [before][after] -OpenBSD September 15, 2013 OpenBSD +OpenBSD June 27, 2017 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ns/position.out_lint b/regress/usr.bin/mandoc/mdoc/Ns/position.out_lint index 9169589536b..aa1f3275cc1 100644 --- a/regress/usr.bin/mandoc/mdoc/Ns/position.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Ns/position.out_lint @@ -1,4 +1,5 @@ mandoc: position.in:3:5: BASE: operating system explicitly specified: Os OpenBSD (OpenBSD) -mandoc: position.in:1:5: BASE: Mdocdate missing: Dd September (OpenBSD) +mandoc: position.in:1:5: BASE: Mdocdate missing: Dd June (OpenBSD) mandoc: position.in:10:2: WARNING: skipping no-space macro +mandoc: position.in:27:15: WARNING: skipping no-space macro mandoc: position.in: BASE: RCS id missing: (OpenBSD) diff --git a/regress/usr.bin/mandoc/mdoc/Ns/position.out_markdown b/regress/usr.bin/mandoc/mdoc/Ns/position.out_markdown index 14414a3e9b3..8b6c509c68c 100644 --- a/regress/usr.bin/mandoc/mdoc/Ns/position.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Ns/position.out_markdown @@ -20,10 +20,16 @@ still before]\[after] In the middle of a macro line: \[before]\[after] +After closing punctuation: +\[before]:\[after] + +Before closing punctuation: +\[before]: \[after] + At the end of a macro line: \[before]\[after] At the end of partial implicit: \[before]\[after] -OpenBSD - September 15, 2013 +OpenBSD - June 27, 2017 |