summaryrefslogtreecommitdiffstats
path: root/regress/roff/while/into.in
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-24 23:12:33 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-24 23:12:33 +0000
commitf5133ff5de286c3849ba772719280fcec35ca374 (patch)
treed010611a454ce17650edf5bc7d26c9d237d10c00 /regress/roff/while/into.in
parent0278f391fed9ab1da96a2f7737b052872f5ced71 (diff)
downloadmandoc-f5133ff5de286c3849ba772719280fcec35ca374.tar.gz
Rudimentary implementation of the roff(7) .while request.
Needed for example by groff_hdtbl(7). There are two limitations: It does not support nested .while requests yet, and each .while loop must start and end in the same scope. The roff_parseln() return codes are now more flexible and allow OR'ing options.
Diffstat (limited to 'regress/roff/while/into.in')
-rw-r--r--regress/roff/while/into.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/regress/roff/while/into.in b/regress/roff/while/into.in
new file mode 100644
index 00000000..6a3bc064
--- /dev/null
+++ b/regress/roff/while/into.in
@@ -0,0 +1,20 @@
+.\" $OpenBSD: into.in,v 1.1 2018/08/24 22:56:37 schwarze Exp $
+.Dd $Mdocdate$
+.Dt WHILE-INTO 1
+.Os
+.Sh NAME
+.Nm while-into
+.Nd while request extending into a macro
+.Sh DESCRIPTION
+.nr cnt 10
+.de closeloop
+.nr cnt -1
+.\}
+..
+initial text
+.while \n[cnt] \{\
+\n[cnt]
+.closeloop
+after macro
+.\}
+final text