summaryrefslogtreecommitdiffstats
path: root/regress/eqn
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-03-11 16:04:18 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-03-11 16:04:18 +0000
commitccb27794cbdefbc04414c1655e968cc5cb7a914a (patch)
tree339b71ed948aec8021eb84c7a5f3fa4ea75d1e38 /regress/eqn
parentbf4e8be28e69b65461d7a841458ac67ee3193d7f (diff)
downloadmandoc-ccb27794cbdefbc04414c1655e968cc5cb7a914a.tar.gz
test infinite recursion in eqn(7) "define" statements
Diffstat (limited to 'regress/eqn')
-rw-r--r--regress/eqn/define/Makefile4
-rw-r--r--regress/eqn/define/infinite.in30
-rw-r--r--regress/eqn/define/infinite.out_ascii15
-rw-r--r--regress/eqn/define/infinite.out_lint4
4 files changed, 51 insertions, 2 deletions
diff --git a/regress/eqn/define/Makefile b/regress/eqn/define/Makefile
index 4be9cf5e..9dfa749c 100644
--- a/regress/eqn/define/Makefile
+++ b/regress/eqn/define/Makefile
@@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.1 2015/01/28 21:10:28 schwarze Exp $
-REGRESS_TARGETS = invalid
-LINT_TARGETS = invalid
+REGRESS_TARGETS = invalid infinite
+LINT_TARGETS = invalid infinite
.include <bsd.regress.mk>
diff --git a/regress/eqn/define/infinite.in b/regress/eqn/define/infinite.in
new file mode 100644
index 00000000..f37602fb
--- /dev/null
+++ b/regress/eqn/define/infinite.in
@@ -0,0 +1,30 @@
+.Dd March 11, 2017
+.Dt DEFINE-INFINITE 1
+.Os OpenBSD
+.Sh NAME
+.Nm define-infinite
+.Nd infinite recursion in define statements
+.Sh DESCRIPTION
+alone:
+.EQ
+define key 'key' key
+.EN
+eol
+.Pp
+leading position:
+.EQ
+define key 'key suffix' key
+.EN
+eol
+.Pp
+middle position:
+.EQ
+define key 'prefix key suffix' key
+.EN
+eol
+.Pp
+trailing position:
+.EQ
+define key 'prefix key' key
+.EN
+eol
diff --git a/regress/eqn/define/infinite.out_ascii b/regress/eqn/define/infinite.out_ascii
new file mode 100644
index 00000000..772d526b
--- /dev/null
+++ b/regress/eqn/define/infinite.out_ascii
@@ -0,0 +1,15 @@
+DEFINE-INFINITE(1) General Commands Manual DEFINE-INFINITE(1)
+
+NNAAMMEE
+ ddeeffiinnee--iinnffiinniittee - infinite recursion in define statements
+
+DDEESSCCRRIIPPTTIIOONN
+ alone: eol
+
+ leading position: eol
+
+ middle position: eol
+
+ trailing position: eol
+
+OpenBSD March 11, 2017 OpenBSD
diff --git a/regress/eqn/define/infinite.out_lint b/regress/eqn/define/infinite.out_lint
new file mode 100644
index 00000000..cb5a0048
--- /dev/null
+++ b/regress/eqn/define/infinite.out_lint
@@ -0,0 +1,4 @@
+mandoc: infinite.in:9:1: ERROR: input stack limit exceeded, infinite loop?
+mandoc: infinite.in:15:1: ERROR: input stack limit exceeded, infinite loop?
+mandoc: infinite.in:21:1: ERROR: input stack limit exceeded, infinite loop?
+mandoc: infinite.in:27:1: ERROR: input stack limit exceeded, infinite loop?