From 141881c887ec609a42b6025503a0082ee59cced0 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 14 Jun 2017 14:02:39 +0000 Subject: implement the roff(7) d (macro or string defined) conditional --- regress/roff/cond/Makefile | 2 +- regress/roff/cond/string.in | 29 +++++++++++++++++++++++++++++ regress/roff/cond/string.out_ascii | 20 ++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 regress/roff/cond/string.in create mode 100644 regress/roff/cond/string.out_ascii (limited to 'regress') diff --git a/regress/roff/cond/Makefile b/regress/roff/cond/Makefile index 68a88694..65d7be52 100644 --- a/regress/roff/cond/Makefile +++ b/regress/roff/cond/Makefile @@ -1,6 +1,6 @@ # $OpenBSD: Makefile,v 1.8 2015/05/31 23:12:17 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 diff --git a/regress/roff/cond/string.in b/regress/roff/cond/string.in new file mode 100644 index 00000000..6d19f4ce --- /dev/null +++ b/regress/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/roff/cond/string.out_ascii b/regress/roff/cond/string.out_ascii new file mode 100644 index 00000000..8df491ac --- /dev/null +++ b/regress/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) -- cgit v1.2.3-56-ge451