aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/roff/nr
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-08 03:02:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-08 03:02:13 +0000
commitd9f0f81c846a8405c29870e4a8379e5e79d1cad3 (patch)
treec07efd74ac58650949dc67576001a720e688319f /regress/roff/nr
parentcdbb1fca07752eb230e5219c22e9e65075c85b82 (diff)
downloadmandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.tar.gz
mandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.tar.zst
mandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.zip
Finally port the OpenBSD regression suite.
Both kristaps@ and wiz@ repeated asked for this, literally for years.
Diffstat (limited to 'regress/roff/nr')
-rw-r--r--regress/roff/nr/Makefile6
-rw-r--r--regress/roff/nr/argc.in21
-rw-r--r--regress/roff/nr/argc.out_ascii17
-rw-r--r--regress/roff/nr/divzero.in8
-rw-r--r--regress/roff/nr/divzero.out_ascii13
-rw-r--r--regress/roff/nr/divzero.out_lint2
-rw-r--r--regress/roff/nr/escname.in17
-rw-r--r--regress/roff/nr/escname.out_ascii19
-rw-r--r--regress/roff/nr/escname.out_lint4
-rw-r--r--regress/roff/nr/eval.in67
-rw-r--r--regress/roff/nr/eval.out_ascii33
-rw-r--r--regress/roff/nr/int.in15
-rw-r--r--regress/roff/nr/int.out_ascii15
-rw-r--r--regress/roff/nr/predef.in24
-rw-r--r--regress/roff/nr/predef.out_ascii21
-rw-r--r--regress/roff/nr/rr.in15
-rw-r--r--regress/roff/nr/rr.out_ascii14
-rw-r--r--regress/roff/nr/scale.in26
-rw-r--r--regress/roff/nr/scale.out_ascii13
19 files changed, 350 insertions, 0 deletions
diff --git a/regress/roff/nr/Makefile b/regress/roff/nr/Makefile
new file mode 100644
index 00000000..8da68878
--- /dev/null
+++ b/regress/roff/nr/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.9 2015/01/23 00:38:43 schwarze Exp $
+
+REGRESS_TARGETS = argc divzero eval escname int predef rr scale
+LINT_TARGETS = divzero escname
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/nr/argc.in b/regress/roff/nr/argc.in
new file mode 100644
index 00000000..bf204a70
--- /dev/null
+++ b/regress/roff/nr/argc.in
@@ -0,0 +1,21 @@
+.Dd December 15, 2013
+.Dt NR-ARGC 1
+.Os OpenBSD
+.Sh NAME
+.Nm nr-argc
+.Nd varying number of arguments to the .nr macro
+.Sh DESCRIPTION
+.nr onearg
+one argument: \n[onearg]
+.Pp
+.nr twoargs 2
+two arguments: \n[twoargs]
+.Pp
+.nr withsuffix 2x
+with suffix: \n[withsuffix]
+.Pp
+.nr threeargs 2 3
+three arguments: \n[threeargs]
+.Pp
+.nr fourargs 2 3 4
+four arguments: \n[fourargs]
diff --git a/regress/roff/nr/argc.out_ascii b/regress/roff/nr/argc.out_ascii
new file mode 100644
index 00000000..80d3d0f1
--- /dev/null
+++ b/regress/roff/nr/argc.out_ascii
@@ -0,0 +1,17 @@
+NR-ARGC(1) General Commands Manual NR-ARGC(1)
+
+NNAAMMEE
+ nnrr--aarrggcc - varying number of arguments to the .nr macro
+
+DDEESSCCRRIIPPTTIIOONN
+ one argument: 0
+
+ two arguments: 2
+
+ with suffix: 2
+
+ three arguments: 2
+
+ four arguments: 2
+
+OpenBSD December 15, 2013 OpenBSD
diff --git a/regress/roff/nr/divzero.in b/regress/roff/nr/divzero.in
new file mode 100644
index 00000000..8f776bf3
--- /dev/null
+++ b/regress/roff/nr/divzero.in
@@ -0,0 +1,8 @@
+.TH NR-DIVZERO 1 "December 18, 2014" OpenBSD
+.SH NAME
+nr-divzero \- division by zero in numerical expression
+.SH DESCRIPTION
+initial text
+.nr divresult 1/0
+.nr modresult 1%0
+final \n[divresult] \n[modresult] text
diff --git a/regress/roff/nr/divzero.out_ascii b/regress/roff/nr/divzero.out_ascii
new file mode 100644
index 00000000..26d93c26
--- /dev/null
+++ b/regress/roff/nr/divzero.out_ascii
@@ -0,0 +1,13 @@
+NR-DIVZERO(1) General Commands Manual NR-DIVZERO(1)
+
+
+
+NNAAMMEE
+ nr-divzero - division by zero in numerical expression
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final 0 0 text
+
+
+
+OpenBSD December 18, 2014 NR-DIVZERO(1)
diff --git a/regress/roff/nr/divzero.out_lint b/regress/roff/nr/divzero.out_lint
new file mode 100644
index 00000000..8177c0b8
--- /dev/null
+++ b/regress/roff/nr/divzero.out_lint
@@ -0,0 +1,2 @@
+mandoc: divzero.in:6:4: ERROR: divide by zero: 1/0
+mandoc: divzero.in:7:4: ERROR: divide by zero: 1%0
diff --git a/regress/roff/nr/escname.in b/regress/roff/nr/escname.in
new file mode 100644
index 00000000..20454568
--- /dev/null
+++ b/regress/roff/nr/escname.in
@@ -0,0 +1,17 @@
+.TH NR-ESCNAME 1 "June 29, 2014" OpenBSD
+.SH NAME
+nr-escname \- escape sequences in register names
+.SH DESCRIPTION
+.nr first 1
+.nr second 2
+.nr first\\second 3
+.nr first\esecond 4
+\n[first] \n[second] \n[first\\second]
+.PP
+.rr first\esecond
+\n[first] \n[second] \n[first\\second]
+.PP
+.rr first\\second
+\n[first] \n[second] \n[first\\second]
+.PP
+incomplete: \n[second
diff --git a/regress/roff/nr/escname.out_ascii b/regress/roff/nr/escname.out_ascii
new file mode 100644
index 00000000..fd970a14
--- /dev/null
+++ b/regress/roff/nr/escname.out_ascii
@@ -0,0 +1,19 @@
+NR-ESCNAME(1) General Commands Manual NR-ESCNAME(1)
+
+
+
+NNAAMMEE
+ nr-escname - escape sequences in register names
+
+DDEESSCCRRIIPPTTIIOONN
+ 1 2 3
+
+ 0 2 3
+
+ 0 2 0
+
+ incomplete:
+
+
+
+OpenBSD June 29, 2014 NR-ESCNAME(1)
diff --git a/regress/roff/nr/escname.out_lint b/regress/roff/nr/escname.out_lint
new file mode 100644
index 00000000..66bfad35
--- /dev/null
+++ b/regress/roff/nr/escname.out_lint
@@ -0,0 +1,4 @@
+mandoc: escname.in:8:5: ERROR: escaped character not allowed in a name: first\e
+mandoc: escname.in:11:5: ERROR: escaped character not allowed in a name: first\e
+mandoc: escname.in:17:13: WARNING: invalid escape sequence: \n[second
+mandoc: escname.in:17:12: WARNING: whitespace at end of input line
diff --git a/regress/roff/nr/eval.in b/regress/roff/nr/eval.in
new file mode 100644
index 00000000..16bf24e3
--- /dev/null
+++ b/regress/roff/nr/eval.in
@@ -0,0 +1,67 @@
+.TH NR-EVAL 1 "April 7, 2014" OpenBSD
+.SH NAME
+nr-eval \- numeric expressions in assignments to number registers
+.SH DESCRIPTION
+.nr mr 1
+1: \n(mr
+.br
+.nr mr nonumber
+nonumber: \n(mr
+.br
+.nr mr 3X
+3X: \n(mr
+.br
+.nr mr 4+
+4+: \n(mr
+.br
+.nr mr 2+3
+2+3: \n(mr
+.br
+.nr mr 1+1:
+1+1:: \n(mr
+.br
+.nr mr 10-3
+10-3: \n(mr
+.br
+.nr mr 4*2
+4*2: \n(mr
+.br
+.nr mr 27/3
+27/3: \n(mr
+.br
+.nr mr 58%16
+58%16: \n(mr
+.br
+.nr mr 11<?20
+11<?20: \n(mr
+.br
+.nr mr 30<?12
+30<?12: \n(mr
+.br
+.nr mr 7>?13
+7>?13: \n(mr
+.br
+.nr mr 14>?6
+14>?6: \n(mr
+.br
+.nr mr 2+3*3
+2+3*3: \n(mr
+.br
+.nr mr 16+(
+para at eol: \n(mr
+.br
+.nr mr (17
+unclosed para: \n(mr
+.br
+.nr mr (18)
+(18): \n(mr
+.br
+.nr mr ( 25 - 6 )
+( 25 - 6 ): \n(mr
+.br
+.nr mr 11+( 3*3 )
+11+( 3*3 ): \n(mr
+.br
+.nr mr 3+(3*(5==5*2)*4)+(3*5)/2
+3+(3*(5==5*2)*4)+(3*5)/2: \n(mr
+.br
diff --git a/regress/roff/nr/eval.out_ascii b/regress/roff/nr/eval.out_ascii
new file mode 100644
index 00000000..5f4c767a
--- /dev/null
+++ b/regress/roff/nr/eval.out_ascii
@@ -0,0 +1,33 @@
+NR-EVAL(1) General Commands Manual NR-EVAL(1)
+
+
+
+NNAAMMEE
+ nr-eval - numeric expressions in assignments to number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ 1: 1
+ nonumber: 1
+ 3X: 3
+ 4+: 3
+ 2+3: 5
+ 1+1:: 5
+ 10-3: 7
+ 4*2: 8
+ 27/3: 9
+ 58%16: 10
+ 11<?20: 11
+ 30<?12: 12
+ 7>?13: 13
+ 14>?6: 14
+ 2+3*3: 15
+ para at eol: 15
+ unclosed para: 17
+ (18): 18
+ ( 25 - 6 ): 19
+ 11+( 3*3 ): 20
+ 3+(3*(5==5*2)*4)+(3*5)/2: 21
+
+
+
+OpenBSD April 7, 2014 NR-EVAL(1)
diff --git a/regress/roff/nr/int.in b/regress/roff/nr/int.in
new file mode 100644
index 00000000..3f907697
--- /dev/null
+++ b/regress/roff/nr/int.in
@@ -0,0 +1,15 @@
+.TH NR-INT 1 "October 3, 2013" OpenBSD
+.SH NAME
+nr-int \- integer number registers
+.SH DESCRIPTION
+initial contents: \nY \n(YY \n[YYY]
+.br
+.nr Y 42
+.nr YY -1
+.nr YYY 2147483647
+intermediate contents: \nY \n(YY \n[YYY]
+.br
+.nr Y -19
+.nr YY +2
+.nr YYY +1
+final contents: \nY \n(YY \n[YYY]
diff --git a/regress/roff/nr/int.out_ascii b/regress/roff/nr/int.out_ascii
new file mode 100644
index 00000000..8471386f
--- /dev/null
+++ b/regress/roff/nr/int.out_ascii
@@ -0,0 +1,15 @@
+NR-INT(1) General Commands Manual NR-INT(1)
+
+
+
+NNAAMMEE
+ nr-int - integer number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ initial contents: 0 0 0
+ intermediate contents: 42 -1 2147483647
+ final contents: 23 1 -2147483648
+
+
+
+OpenBSD October 3, 2013 NR-INT(1)
diff --git a/regress/roff/nr/predef.in b/regress/roff/nr/predef.in
new file mode 100644
index 00000000..3610340d
--- /dev/null
+++ b/regress/roff/nr/predef.in
@@ -0,0 +1,24 @@
+.TH NR-PREDEF 1 "August 29, 2015" OpenBSD
+.SH NAME
+nr-predef \- pre-defined read-only integer number registers
+.SH DESCRIPTION
+.de mym
+user defined macro with \\n(.$ arguments: \\$*
+..
+.nf
+.nr .A 111
+.nr .g 111
+.nr .H 111
+.nr .j 111
+.nr .T 111
+.nr .V 111
+.nr .$ 111
+ascii mode: \n(.A
+groff mode: \n(.g
+horizontal resolution: \n(.H
+adjustment mode: \n(.j
+output device defined: \n(.T
+vertical resolution: \n(.V
+.mym
+.mym one
+.mym one two
diff --git a/regress/roff/nr/predef.out_ascii b/regress/roff/nr/predef.out_ascii
new file mode 100644
index 00000000..6973d296
--- /dev/null
+++ b/regress/roff/nr/predef.out_ascii
@@ -0,0 +1,21 @@
+NR-PREDEF(1) General Commands Manual NR-PREDEF(1)
+
+
+
+NNAAMMEE
+ nr-predef - pre-defined read-only integer number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ ascii mode: 0
+ groff mode: 1
+ horizontal resolution: 24
+ adjustment mode: 0
+ output device defined: 1
+ vertical resolution: 40
+ user defined macro with 0 arguments:
+ user defined macro with 1 arguments: one
+ user defined macro with 2 arguments: one two
+
+
+
+OpenBSD August 29, 2015 NR-PREDEF(1)
diff --git a/regress/roff/nr/rr.in b/regress/roff/nr/rr.in
new file mode 100644
index 00000000..06ccdf64
--- /dev/null
+++ b/regress/roff/nr/rr.in
@@ -0,0 +1,15 @@
+.TH NR-RR 1 "April 5, 2014" OpenBSD
+.SH NAME
+nr-rr \- defining and undefining number registers
+.SH DESCRIPTION
+.nr key1 1
+.nr key2 2
+.nr key3 3
+.nr key4 4
+.nr key5 5
+.rr key1
+.rr key3
+.rr key5
+non-null values: \n[key2] \n[key4]
+.br
+unset values: \n[key1] \n[key3] \n[key5]
diff --git a/regress/roff/nr/rr.out_ascii b/regress/roff/nr/rr.out_ascii
new file mode 100644
index 00000000..21b50ee2
--- /dev/null
+++ b/regress/roff/nr/rr.out_ascii
@@ -0,0 +1,14 @@
+NR-RR(1) General Commands Manual NR-RR(1)
+
+
+
+NNAAMMEE
+ nr-rr - defining and undefining number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ non-null values: 2 4
+ unset values: 0 0 0
+
+
+
+OpenBSD April 5, 2014 NR-RR(1)
diff --git a/regress/roff/nr/scale.in b/regress/roff/nr/scale.in
new file mode 100644
index 00000000..6f63c589
--- /dev/null
+++ b/regress/roff/nr/scale.in
@@ -0,0 +1,26 @@
+.TH NR-INT 1 "January 23, 2015" OpenBSD
+.SH NAME
+nr-scale \- scaling units in numeric expressions
+.SH DESCRIPTION
+.nr Y 1f+1
+\nY
+.nr Y 1i+1
+\nY
+.nr Y 10c+1
+\nY
+.nr Y 1v+1
+\nY
+.nr Y 1P+1
+\nY
+.nr Y 1m+1
+\nY
+.nr Y 1n+1
+\nY
+.nr Y 10p+1
+\nY
+.nr Y 1u+1
+\nY
+.nr Y 100M+1
+\nY
+.nr Y 1X+2
+\nY
diff --git a/regress/roff/nr/scale.out_ascii b/regress/roff/nr/scale.out_ascii
new file mode 100644
index 00000000..c6f79b2a
--- /dev/null
+++ b/regress/roff/nr/scale.out_ascii
@@ -0,0 +1,13 @@
+NR-INT(1) General Commands Manual NR-INT(1)
+
+
+
+NNAAMMEE
+ nr-scale - scaling units in numeric expressions
+
+DDEESSCCRRIIPPTTIIOONN
+ 65537 241 945 41 41 25 25 34 2 25 1
+
+
+
+OpenBSD January 23, 2015 NR-INT(1)