]> git.cameronkatri.com Git - mandoc.git/commitdiff
test infinite recursion in eqn(7) "define" statements
authorIngo Schwarze <schwarze@openbsd.org>
Sat, 11 Mar 2017 16:04:18 +0000 (16:04 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Sat, 11 Mar 2017 16:04:18 +0000 (16:04 +0000)
regress/eqn/define/Makefile
regress/eqn/define/infinite.in [new file with mode: 0644]
regress/eqn/define/infinite.out_ascii [new file with mode: 0644]
regress/eqn/define/infinite.out_lint [new file with mode: 0644]

index 4be9cf5ebed58490252e898247b2045ff332cc57..9dfa749cdb806e25cab02f88e31ba19607a77006 100644 (file)
@@ -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 (file)
index 0000000..f37602f
--- /dev/null
@@ -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 (file)
index 0000000..772d526
--- /dev/null
@@ -0,0 +1,15 @@
+DEFINE-INFINITE(1)          General Commands Manual         DEFINE-INFINITE(1)
+
+N\bNA\bAM\bME\bE
+     d\bde\bef\bfi\bin\bne\be-\b-i\bin\bnf\bfi\bin\bni\bit\bte\be - infinite recursion in define statements
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+     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 (file)
index 0000000..cb5a004
--- /dev/null
@@ -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?