summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--regress/roff/args/Makefile7
-rw-r--r--regress/roff/args/infrec.in10
-rw-r--r--regress/roff/args/infrec.out_ascii9
-rw-r--r--regress/roff/args/infrec.out_lint1
4 files changed, 24 insertions, 3 deletions
diff --git a/regress/roff/args/Makefile b/regress/roff/args/Makefile
index c1f0901e..49aa653b 100644
--- a/regress/roff/args/Makefile
+++ b/regress/roff/args/Makefile
@@ -1,6 +1,7 @@
-# $OpenBSD: Makefile,v 1.5 2023/10/21 17:28:01 schwarze Exp $
+# $OpenBSD: Makefile,v 1.6 2023/10/22 16:54:19 schwarze Exp $
-REGRESS_TARGETS = roff man mdoc esc
-LINT_TARGETS = roff man mdoc
+REGRESS_TARGETS = roff man mdoc esc infrec
+LINT_TARGETS = roff man mdoc infrec
+SKIP_GROFF = infrec
.include <bsd.regress.mk>
diff --git a/regress/roff/args/infrec.in b/regress/roff/args/infrec.in
new file mode 100644
index 00000000..5935404f
--- /dev/null
+++ b/regress/roff/args/infrec.in
@@ -0,0 +1,10 @@
+.\" $OpenBSD: infrec.in,v 1.1 2023/10/22 16:54:19 schwarze Exp $
+.TH ARGS-INFREC 1 "October 22, 2023"
+.SH NAME
+args-infrec - infinite recursion in macro argument expansion
+.SH DESCRIPTION
+.ds mys first word
+.ds mys \\*[mys] another word
+initial text
+.RB prefix \\*[mys] postfix
+final text
diff --git a/regress/roff/args/infrec.out_ascii b/regress/roff/args/infrec.out_ascii
new file mode 100644
index 00000000..e619c08b
--- /dev/null
+++ b/regress/roff/args/infrec.out_ascii
@@ -0,0 +1,9 @@
+ARGS-INFREC(1) General Commands Manual ARGS-INFREC(1)
+
+NNAAMMEE
+ args-infrec - infinite recursion in macro argument expansion
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text prefixpostfix final text
+
+OpenBSD October 22, 2023 ARGS-INFREC(1)
diff --git a/regress/roff/args/infrec.out_lint b/regress/roff/args/infrec.out_lint
new file mode 100644
index 00000000..1de6423c
--- /dev/null
+++ b/regress/roff/args/infrec.out_lint
@@ -0,0 +1 @@
+mandoc: infrec.in:9:1: ERROR: input stack limit exceeded, infinite loop?