diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-04-21 23:45:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-04-21 23:45:51 +0000 |
commit | 34a67710acdf71367ef39bbecfa77c779c06e02e (patch) | |
tree | eef2dccff1bd0a3e9fb332a77b1ed36bb40a760c /regress/usr.bin | |
parent | 4f5bfee9461d5b9b6911f86d1ab77417eb7a6c70 (diff) |
When calling an empty macro, do not clobber existing arguments.
Fixing a bug found with the groffer(1) version 1.19 manual page
following a report from Jan Stary.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r-- | regress/usr.bin/mandoc/roff/de/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/de/empty.in | 18 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/de/empty.out_ascii | 9 |
3 files changed, 30 insertions, 3 deletions
diff --git a/regress/usr.bin/mandoc/roff/de/Makefile b/regress/usr.bin/mandoc/roff/de/Makefile index 6760dc6e21a..86ea8c8c56c 100644 --- a/regress/usr.bin/mandoc/roff/de/Makefile +++ b/regress/usr.bin/mandoc/roff/de/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.12 2019/02/06 20:54:28 schwarze Exp $ +# $OpenBSD: Makefile,v 1.13 2019/04/21 23:45:50 schwarze Exp $ -REGRESS_TARGETS = append cond escname factorial indir infinite startde tab -REGRESS_TARGETS += TH Dd +REGRESS_TARGETS = append cond empty escname factorial +REGRESS_TARGETS += indir infinite startde tab TH Dd LINT_TARGETS = escname indir infinite # groff-1.22.4 defect: diff --git a/regress/usr.bin/mandoc/roff/de/empty.in b/regress/usr.bin/mandoc/roff/de/empty.in new file mode 100644 index 00000000000..decfcb51077 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/de/empty.in @@ -0,0 +1,18 @@ +.\" $OpenBSD: empty.in,v 1.1 2019/04/21 23:45:50 schwarze Exp $ +.Dd $Mdocdate: April 21 2019 $ +.Dt DE-EMPTY 1 +.Os +.Sh NAME +.Nm de-empty +.Nd empty user-defined macro with arguments +.Sh DESCRIPTION +initial text +.de empty +.. +.de real +arg=\\$1 +.empty wrong +arg=\\$1 +.. +.real right +final text diff --git a/regress/usr.bin/mandoc/roff/de/empty.out_ascii b/regress/usr.bin/mandoc/roff/de/empty.out_ascii new file mode 100644 index 00000000000..1883fd3e98e --- /dev/null +++ b/regress/usr.bin/mandoc/roff/de/empty.out_ascii @@ -0,0 +1,9 @@ +DE-EMPTY(1) General Commands Manual DE-EMPTY(1) + +NNAAMMEE + ddee--eemmppttyy - empty user-defined macro with arguments + +DDEESSCCRRIIPPTTIIOONN + initial text arg=right arg=right final text + +OpenBSD April 21, 2019 OpenBSD |