summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2023-10-22 16:54:20 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2023-10-22 16:54:20 +0000
commit8ab634a765a90204c68f8efcaddce47b77206b5c (patch)
treedc04df95bc1b29a2a4cb9c5fd531535d954801c7 /regress/usr.bin
parent4145dcd4c45efaaa699582637735b8163a62f90e (diff)
new regression test for roff.c rev. 1.270:
infinite recursion in macro argument expansion
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/mandoc/roff/args/Makefile7
-rw-r--r--regress/usr.bin/mandoc/roff/args/infrec.in10
-rw-r--r--regress/usr.bin/mandoc/roff/args/infrec.out_ascii9
-rw-r--r--regress/usr.bin/mandoc/roff/args/infrec.out_lint1
4 files changed, 24 insertions, 3 deletions
diff --git a/regress/usr.bin/mandoc/roff/args/Makefile b/regress/usr.bin/mandoc/roff/args/Makefile
index c1f0901ebbc..49aa653b442 100644
--- a/regress/usr.bin/mandoc/roff/args/Makefile
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/roff/args/infrec.in b/regress/usr.bin/mandoc/roff/args/infrec.in
new file mode 100644
index 00000000000..5935404fdd4
--- /dev/null
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/roff/args/infrec.out_ascii b/regress/usr.bin/mandoc/roff/args/infrec.out_ascii
new file mode 100644
index 00000000000..e619c08b38d
--- /dev/null
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/roff/args/infrec.out_lint b/regress/usr.bin/mandoc/roff/args/infrec.out_lint
new file mode 100644
index 00000000000..1de6423ccd4
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/args/infrec.out_lint
@@ -0,0 +1 @@
+mandoc: infrec.in:9:1: ERROR: input stack limit exceeded, infinite loop?