aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-14 22:51:25 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-14 22:51:25 +0000
commita5cb8b874ed422ba6f202f5cd0dc73e4689e168b (patch)
tree04995cd7ced1bad663ee8096460feda6fa6f3b5a /regress
parente9ac0876da23cde98a17d36ab849630061754ff0 (diff)
downloadmandoc-a5cb8b874ed422ba6f202f5cd0dc73e4689e168b.tar.gz
mandoc-a5cb8b874ed422ba6f202f5cd0dc73e4689e168b.tar.zst
mandoc-a5cb8b874ed422ba6f202f5cd0dc73e4689e168b.zip
Naive implementation of the roff(7) .po (page offset) request.
This clearly works when .po is called on the top level, but might not be sophisticated enough if people call .po inside indentation-changing contexts, but i haven't seen that in manual pages (yet :).
Diffstat (limited to 'regress')
-rw-r--r--regress/roff/Makefile2
-rw-r--r--regress/roff/po/Makefile5
-rw-r--r--regress/roff/po/basic-mdoc.in20
-rw-r--r--regress/roff/po/basic-mdoc.out_ascii17
4 files changed, 43 insertions, 1 deletions
diff --git a/regress/roff/Makefile b/regress/roff/Makefile
index 0a464197..dae2ac37 100644
--- a/regress/roff/Makefile
+++ b/regress/roff/Makefile
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.20 2015/02/06 16:05:51 schwarze Exp $
SUBDIR = args cond esc scale string
-SUBDIR += br cc de ds ft ig it ll na nr ps rm sp ta ti tr
+SUBDIR += br cc de ds ft ig it ll na nr po ps rm sp ta ti tr
.include "../Makefile.sub"
.include <bsd.subdir.mk>
diff --git a/regress/roff/po/Makefile b/regress/roff/po/Makefile
new file mode 100644
index 00000000..dabc7c9e
--- /dev/null
+++ b/regress/roff/po/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2017/05/08 15:33:43 schwarze Exp $
+
+REGRESS_TARGETS = basic-mdoc
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/po/basic-mdoc.in b/regress/roff/po/basic-mdoc.in
new file mode 100644
index 00000000..082be68c
--- /dev/null
+++ b/regress/roff/po/basic-mdoc.in
@@ -0,0 +1,20 @@
+.Dd June 14, 2017
+.Dt PO-BASIC-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm po-basic-mdoc
+.Nd the roff page offset request
+.Sh DESCRIPTION
+initial text
+.Pp
+.po -2n
+shifted left
+.Pp
+.po +5n
+shifted right
+.Pp
+.po XXX
+shifted left
+.Pp
+.po 0
+final text
diff --git a/regress/roff/po/basic-mdoc.out_ascii b/regress/roff/po/basic-mdoc.out_ascii
new file mode 100644
index 00000000..0b35c2bd
--- /dev/null
+++ b/regress/roff/po/basic-mdoc.out_ascii
@@ -0,0 +1,17 @@
+PO-BASIC-MDOC(1) General Commands Manual PO-BASIC-MDOC(1)
+
+NNAAMMEE
+ ppoo--bbaassiicc--mmddoocc - the roff page offset request
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ shifted left
+
+ shifted right
+
+ shifted left
+
+ final text
+
+OpenBSD June 14, 2017 OpenBSD