diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-08 03:02:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-02-08 03:02:13 +0000 |
commit | 4c0770c1ecd159a77561d8e0364385f4bb758650 (patch) | |
tree | 5c2d5820b093c1c08b6047ff110e9b055083a5ea /regress/roff/de | |
parent | d16e7f2cf346476e177ce672851b0b957aebbe5d (diff) | |
download | mandoc-4c0770c1ecd159a77561d8e0364385f4bb758650.tar.gz |
Finally port the OpenBSD regression suite.
Both kristaps@ and wiz@ repeated asked for this,
literally for years.
Diffstat (limited to 'regress/roff/de')
-rw-r--r-- | regress/roff/de/Dd.in | 11 | ||||
-rw-r--r-- | regress/roff/de/Dd.out_ascii | 9 | ||||
-rw-r--r-- | regress/roff/de/Makefile | 44 | ||||
-rw-r--r-- | regress/roff/de/TH.in | 8 | ||||
-rw-r--r-- | regress/roff/de/TH.out_ascii | 13 | ||||
-rw-r--r-- | regress/roff/de/append.in | 25 | ||||
-rw-r--r-- | regress/roff/de/append.out_ascii | 9 | ||||
-rw-r--r-- | regress/roff/de/cond.in | 13 | ||||
-rw-r--r-- | regress/roff/de/cond.out_ascii | 9 | ||||
-rw-r--r-- | regress/roff/de/escname.in | 43 | ||||
-rw-r--r-- | regress/roff/de/escname.out_ascii | 23 | ||||
-rw-r--r-- | regress/roff/de/escname.out_lint | 8 | ||||
-rw-r--r-- | regress/roff/de/factorial.in | 31 | ||||
-rw-r--r-- | regress/roff/de/factorial.out_ascii | 18 | ||||
-rw-r--r-- | regress/roff/de/indir.in | 30 | ||||
-rw-r--r-- | regress/roff/de/indir.out_ascii | 12 | ||||
-rw-r--r-- | regress/roff/de/indir.out_lint | 4 | ||||
-rw-r--r-- | regress/roff/de/startde.in | 24 | ||||
-rw-r--r-- | regress/roff/de/startde.out_ascii | 15 |
19 files changed, 349 insertions, 0 deletions
diff --git a/regress/roff/de/Dd.in b/regress/roff/de/Dd.in new file mode 100644 index 00000000..4dcbdd2b --- /dev/null +++ b/regress/roff/de/Dd.in @@ -0,0 +1,11 @@ +.de At +BSD +.. +.Dd June 3, 2012 +.Dt DE-DD 1 +.Os OpenBSD +.Sh NAME +.Nm de-Dd +.Nd interaction of the Dd macro with de requests +.Sh DESCRIPTION +.At diff --git a/regress/roff/de/Dd.out_ascii b/regress/roff/de/Dd.out_ascii new file mode 100644 index 00000000..1b04eea9 --- /dev/null +++ b/regress/roff/de/Dd.out_ascii @@ -0,0 +1,9 @@ +DE-DD(1) General Commands Manual DE-DD(1) + +NNAAMMEE + ddee--DDdd - interaction of the Dd macro with de requests + +DDEESSCCRRIIPPTTIIOONN + AT&T UNIX + +OpenBSD June 3, 2012 OpenBSD diff --git a/regress/roff/de/Makefile b/regress/roff/de/Makefile new file mode 100644 index 00000000..9488ce05 --- /dev/null +++ b/regress/roff/de/Makefile @@ -0,0 +1,44 @@ +# $OpenBSD: Makefile,v 1.9 2015/02/03 19:37:25 schwarze Exp $ + +REGRESS_TARGETS = append cond escname factorial indir startde TH Dd +LINT_TARGETS = escname indir + +.include <bsd.regress.mk> + + +# OpenBSD only: non-standard targets + +# --- additions to public targets --- + +all ascii: ascii-diff-opt + +ascii-clean: ascii-clean-opt + +groff: TH.out_ascii_opt Dd.out_ascii_opt + +groff-clean: groff-clean-opt + + +# --- local rules --- + +ascii-diff-opt: TH.mandoc_ascii_opt Dd.mandoc_ascii_opt + @${DIFF} ${.CURDIR}/TH.out_ascii_opt TH.mandoc_ascii_opt + @${DIFF} ${.CURDIR}/Dd.out_ascii_opt Dd.mandoc_ascii_opt + +TH.mandoc_ascii_opt: TH.in + @${MANDOC} -Tascii -man ${.ALLSRC} > ${.TARGET} + +Dd.mandoc_ascii_opt: Dd.in + @${MANDOC} -Tascii -mdoc ${.ALLSRC} > ${.TARGET} + +ascii-clean-opt: + @rm -f TH.mandoc_ascii_opt Dd.mandoc_ascii_opt + +TH.out_ascii_opt: TH.in + /usr/local/bin/nroff -c -man -Tascii ${.ALLSRC} > ${.TARGET} + +Dd.out_ascii_opt: Dd.in + /usr/local/bin/nroff -c -mdoc -Tascii ${.ALLSRC} > ${.TARGET} + +groff-clean-opt: + rm -f TH.out_ascii_opt Dd.out_ascii_opt diff --git a/regress/roff/de/TH.in b/regress/roff/de/TH.in new file mode 100644 index 00000000..50b6401f --- /dev/null +++ b/regress/roff/de/TH.in @@ -0,0 +1,8 @@ +.de BI +.IB \\$1 \\$2 \\$3 +.. +.TH DE-TH 1 "June 3, 2012" OpenBSD +.SH NAME +de-TH - interaction of the TH macro with de requests +.SH DESCRIPTION +.BI bold italic bold diff --git a/regress/roff/de/TH.out_ascii b/regress/roff/de/TH.out_ascii new file mode 100644 index 00000000..35e1886a --- /dev/null +++ b/regress/roff/de/TH.out_ascii @@ -0,0 +1,13 @@ +DE-TH(1) General Commands Manual DE-TH(1) + + + +NNAAMMEE + de-TH - interaction of the TH macro with de requests + +DDEESSCCRRIIPPTTIIOONN + bboolldd_i_t_a_l_i_cbboolldd + + + +OpenBSD June 3, 2012 DE-TH(1) diff --git a/regress/roff/de/append.in b/regress/roff/de/append.in new file mode 100644 index 00000000..cdc01bdd --- /dev/null +++ b/regress/roff/de/append.in @@ -0,0 +1,25 @@ +.Dd July 7, 2014 +.Dt DE-APPEND 1 +.Os OpenBSD +.Sh NAME +.Nm de-append +.Nd append to macro definitions +.Sh DESCRIPTION +de: +.de mym +.Ox +.. +.mym +am: +.am mym +.Nx +.. +.mym +ami: +.ds myim mym +.ds myie mye +.ami myim myie +.Fx +.mye +.mym +end diff --git a/regress/roff/de/append.out_ascii b/regress/roff/de/append.out_ascii new file mode 100644 index 00000000..c5f4363c --- /dev/null +++ b/regress/roff/de/append.out_ascii @@ -0,0 +1,9 @@ +DE-APPEND(1) General Commands Manual DE-APPEND(1) + +NNAAMMEE + ddee--aappppeenndd - append to macro definitions + +DDEESSCCRRIIPPTTIIOONN + de: OpenBSD am: OpenBSD NetBSD ami: OpenBSD NetBSD FreeBSD end + +OpenBSD July 7, 2014 OpenBSD diff --git a/regress/roff/de/cond.in b/regress/roff/de/cond.in new file mode 100644 index 00000000..057ad3a0 --- /dev/null +++ b/regress/roff/de/cond.in @@ -0,0 +1,13 @@ +.Dd January 7, 2015 +.Dt DE-COND 1 +.Os OpenBSD +.Sh NAME +.Nm de-cond +.Nd conditional execution of a user-defined macro +.Sh DESCRIPTION +.de mym +This is the text printed by the macro. +.. +preceding text +.if n .mym +following text diff --git a/regress/roff/de/cond.out_ascii b/regress/roff/de/cond.out_ascii new file mode 100644 index 00000000..2f946407 --- /dev/null +++ b/regress/roff/de/cond.out_ascii @@ -0,0 +1,9 @@ +DE-COND(1) General Commands Manual DE-COND(1) + +NNAAMMEE + ddee--ccoonndd - conditional execution of a user-defined macro + +DDEESSCCRRIIPPTTIIOONN + preceding text This is the text printed by the macro. following text + +OpenBSD January 7, 2015 OpenBSD diff --git a/regress/roff/de/escname.in b/regress/roff/de/escname.in new file mode 100644 index 00000000..da6d885f --- /dev/null +++ b/regress/roff/de/escname.in @@ -0,0 +1,43 @@ +.Dd June 29, 2014 +.Dt DE-ESCNAME 1 +.Os OpenBSD +.Sh NAME +.Nm de-escname +.Nd escape sequences in macro names +.Sh DESCRIPTION +initial text +.Pp +define second = val2 +.de second +val2 +.. +.Pp +define first\esecond = val3 +.de first\\second end3 +val3 +.end3 +.Pp +define first = val1 +.de first\esecond +val1 +.. +.Pp +Values (first, second, first\esecond): +.first +.second +.first\\second +.Pp +Remove all but second: +.rm first\\second first\esecond second +.first +.second +.first\\second +.Pp +macro seperated from argument by an escape sequence: +.de witharg end4 excess arguments +.Dq \\$1 +.end4 tail argument +.witharg\(enargument +.Pp +.de\e +final text diff --git a/regress/roff/de/escname.out_ascii b/regress/roff/de/escname.out_ascii new file mode 100644 index 00000000..9a2d825a --- /dev/null +++ b/regress/roff/de/escname.out_ascii @@ -0,0 +1,23 @@ +DE-ESCNAME(1) General Commands Manual DE-ESCNAME(1) + +NNAAMMEE + ddee--eessccnnaammee - escape sequences in macro names + +DDEESSCCRRIIPPTTIIOONN + initial text + + define second = val2 + + define first\second = val3 + + define first = val1 + + Values (first, second, first\second): val1 val2 val3 + + Remove all but second: val2 + + macro seperated from argument by an escape sequence: ``argument'' + + final text + +OpenBSD June 29, 2014 OpenBSD diff --git a/regress/roff/de/escname.out_lint b/regress/roff/de/escname.out_lint new file mode 100644 index 00000000..b4dd49a0 --- /dev/null +++ b/regress/roff/de/escname.out_lint @@ -0,0 +1,8 @@ +mandoc: escname.in:21:1: ERROR: escaped character not allowed in a name: first\e +mandoc: escname.in:31:19: ERROR: escaped character not allowed in a name: first\e +mandoc: escname.in:32:2: ERROR: skipping unknown macro: .first +mandoc: escname.in:34:2: ERROR: skipping unknown macro: .first\\second +mandoc: escname.in:37:5: ERROR: skipping excess arguments: .de ... excess arguments +mandoc: escname.in:40:1: ERROR: escaped character not allowed in a name: witharg\( +mandoc: escname.in:42:1: ERROR: escaped character not allowed in a name: de\e +mandoc: escname.in:42:1: WARNING: skipping empty request: de diff --git a/regress/roff/de/factorial.in b/regress/roff/de/factorial.in new file mode 100644 index 00000000..8d83714b --- /dev/null +++ b/regress/roff/de/factorial.in @@ -0,0 +1,31 @@ +.Dd December 30, 2014 +.Dt FACTORIAL 1 +.Os OpenBSD +.Sh NAME +.Nm factorial +.Nd factorial sequence +.Sh DESCRIPTION +.\" recursively calculate a single factorial +.de rfac +. ie \\$1>1 \{\ +. No \\$1 * +. nr i \\$1-1 +. rfac \\ni +. nr acc \\n[acc]*\\$1 +. \} +. el .nr acc 1 +.. +.\" recursively print a sequence of factorials +.de fac +. No \\$1! = +. rfac \\$1 +. if \\$1>1 1 = +. No \\n[acc] +. if \\$1 \{\ +. br +. nr i \\$1-1 +. fac \\ni +. \} +.. +.\" main program +.fac 9 diff --git a/regress/roff/de/factorial.out_ascii b/regress/roff/de/factorial.out_ascii new file mode 100644 index 00000000..cdc019ed --- /dev/null +++ b/regress/roff/de/factorial.out_ascii @@ -0,0 +1,18 @@ +FACTORIAL(1) General Commands Manual FACTORIAL(1) + +NNAAMMEE + ffaaccttoorriiaall - factorial sequence + +DDEESSCCRRIIPPTTIIOONN + 9! = 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 362880 + 8! = 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 40320 + 7! = 7 * 6 * 5 * 4 * 3 * 2 * 1 = 5040 + 6! = 6 * 5 * 4 * 3 * 2 * 1 = 720 + 5! = 5 * 4 * 3 * 2 * 1 = 120 + 4! = 4 * 3 * 2 * 1 = 24 + 3! = 3 * 2 * 1 = 6 + 2! = 2 * 1 = 2 + 1! = 1 + 0! = 1 + +OpenBSD December 30, 2014 OpenBSD diff --git a/regress/roff/de/indir.in b/regress/roff/de/indir.in new file mode 100644 index 00000000..13d10071 --- /dev/null +++ b/regress/roff/de/indir.in @@ -0,0 +1,30 @@ +.Dd July 7, 2014 +.Dt DE-INDIR 1 +.Os OpenBSD +.Sh NAME +.Nm de-indir +.Nd indirect macro definitions +.Sh DESCRIPTION +full dei: +.ds myim mym +.ds myie mye +.dei myim myie +text1 +.mye +.mym +.br +dei with undefined second argument: +.rm myie mym +.dei myim myie +text2 +.. +.mym +.br +dei with undefined first argument: +.rm myim mym +.dei myim +text3 +.br +dei without arguments: +.dei +text4 diff --git a/regress/roff/de/indir.out_ascii b/regress/roff/de/indir.out_ascii new file mode 100644 index 00000000..4cb592b1 --- /dev/null +++ b/regress/roff/de/indir.out_ascii @@ -0,0 +1,12 @@ +DE-INDIR(1) General Commands Manual DE-INDIR(1) + +NNAAMMEE + ddee--iinnddiirr - indirect macro definitions + +DDEESSCCRRIIPPTTIIOONN + full dei: text1 + dei with undefined second argument: text2 + dei with undefined first argument: text3 + dei without arguments: text4 + +OpenBSD July 7, 2014 OpenBSD diff --git a/regress/roff/de/indir.out_lint b/regress/roff/de/indir.out_lint new file mode 100644 index 00000000..43194fea --- /dev/null +++ b/regress/roff/de/indir.out_lint @@ -0,0 +1,4 @@ +mandoc: indir.in:18:11: WARNING: undefined string, using "": myie +mandoc: indir.in:25:6: WARNING: undefined string, using "": myim +mandoc: indir.in:25:1: WARNING: skipping empty request: dei +mandoc: indir.in:29:1: WARNING: skipping empty request: dei diff --git a/regress/roff/de/startde.in b/regress/roff/de/startde.in new file mode 100644 index 00000000..ca9cfac1 --- /dev/null +++ b/regress/roff/de/startde.in @@ -0,0 +1,24 @@ +.Dd December 30, 2014 +.Dt DE-STARTDE 1 +.Os OpenBSD +.Sh NAME +.Nm de-startde +.Nd macro starting a macro definition, but not ending it +.Sh DESCRIPTION +define outer macro: +.de outer +outer macro called; define inner macro: +.de inner +inner macro called; end outer scope. +.. +outer scope ended; outer macro now defined. +.Pp +call outer macro: +.outer +returned from call of outer macro; end inner scope. +.. +inner scope ended; inner macro now defined. +.Pp +call inner macro: +.inner +returned from call of inner macro. diff --git a/regress/roff/de/startde.out_ascii b/regress/roff/de/startde.out_ascii new file mode 100644 index 00000000..05b58e8c --- /dev/null +++ b/regress/roff/de/startde.out_ascii @@ -0,0 +1,15 @@ +DE-STARTDE(1) General Commands Manual DE-STARTDE(1) + +NNAAMMEE + ddee--ssttaarrttddee - macro starting a macro definition, but not ending it + +DDEESSCCRRIIPPTTIIOONN + define outer macro: outer scope ended; outer macro now defined. + + call outer macro: outer macro called; define inner macro: inner scope + ended; inner macro now defined. + + call inner macro: inner macro called; end outer scope. returned from + call of outer macro; end inner scope. returned from call of inner macro. + +OpenBSD December 30, 2014 OpenBSD |