summaryrefslogtreecommitdiffstats
path: root/regress/usr.bin/mandoc/roff
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-06-14 14:01:34 +0000
committerschwarze <schwarze@openbsd.org>2017-06-14 14:01:34 +0000
commitc2f35d21380404e32c4920d8084ed33d3ad1c39f (patch)
tree39ab8a3308eeda8f52cf2f1ff58e6a2f72a7127a /regress/usr.bin/mandoc/roff
parentSplit early startup code out of armv7_start.S into locore0.S. Adjust (diff)
downloadwireguard-openbsd-c2f35d21380404e32c4920d8084ed33d3ad1c39f.tar.xz
wireguard-openbsd-c2f35d21380404e32c4920d8084ed33d3ad1c39f.zip
implement the roff(7) d (macro or string defined) conditional
Diffstat (limited to 'regress/usr.bin/mandoc/roff')
-rw-r--r--regress/usr.bin/mandoc/roff/cond/Makefile4
-rw-r--r--regress/usr.bin/mandoc/roff/cond/string.in29
-rw-r--r--regress/usr.bin/mandoc/roff/cond/string.out_ascii20
3 files changed, 51 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/roff/cond/Makefile b/regress/usr.bin/mandoc/roff/cond/Makefile
index 68a88694a01..5bdcc14f02f 100644
--- a/regress/usr.bin/mandoc/roff/cond/Makefile
+++ b/regress/usr.bin/mandoc/roff/cond/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.8 2015/05/31 23:12:17 schwarze Exp $
+# $OpenBSD: Makefile,v 1.9 2017/06/14 14:01:34 schwarze Exp $
-REGRESS_TARGETS = if ie close numeric register strcmp before-Dd
+REGRESS_TARGETS = if ie close numeric register strcmp string before-Dd
LINT_TARGETS = if close
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/roff/cond/string.in b/regress/usr.bin/mandoc/roff/cond/string.in
new file mode 100644
index 00000000000..6d19f4ce2b8
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/string.in
@@ -0,0 +1,29 @@
+.TH STRING 1 "June 14, 2017" OpenBSD
+.SH NAME
+string \- conditional testing whether a string is defined
+.SH DESCRIPTION
+.ie d mystr OOPS
+.el mystr not yet defined
+.br
+.ds mystr mystrval
+.ie d mystr now defined
+.el OOPS
+.if !d mystr OOPS
+.PP
+.ie d mymac OOPS
+.el mymac not yet defined
+.br
+.de mymac
+mymacval
+..
+.ie dmymac now defined
+.el OOPS
+.if !d mymac OOPS
+.PP
+.ie d myren OOPS
+.el myren not yet defined
+.br
+.rn SM myren
+.ie d myren now defined
+.el OOPS
+.if !d myren OOPS
diff --git a/regress/usr.bin/mandoc/roff/cond/string.out_ascii b/regress/usr.bin/mandoc/roff/cond/string.out_ascii
new file mode 100644
index 00000000000..8df491ac06d
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/string.out_ascii
@@ -0,0 +1,20 @@
+STRING(1) General Commands Manual STRING(1)
+
+
+
+NNAAMMEE
+ string - conditional testing whether a string is defined
+
+DDEESSCCRRIIPPTTIIOONN
+ mystr not yet defined
+ now defined
+
+ mymac not yet defined
+ now defined
+
+ myren not yet defined
+ now defined
+
+
+
+OpenBSD June 14, 2017 STRING(1)