aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/roff/cond/numeric.in
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/cond/numeric.in
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/cond/numeric.in')
-rw-r--r--regress/roff/cond/numeric.in152
1 files changed, 152 insertions, 0 deletions
diff --git a/regress/roff/cond/numeric.in b/regress/roff/cond/numeric.in
new file mode 100644
index 00000000..e96f3087
--- /dev/null
+++ b/regress/roff/cond/numeric.in
@@ -0,0 +1,152 @@
+.TH COND-NUMERIC 1 "December 16, 2014" OpenBSD
+.SH NAME
+cond-numeric \- roff conditions involving numbers
+.SH DESCRIPTION
+positive number:
+plain
+.ie 42 (t)
+.el (f)
+negated
+.ie !42 (t)
+.el (f)
+.PP
+negative number:
+plain
+.ie -42 (t)
+.el (f)
+negated
+.ie !-42 (t)
+.el (f)
+.PP
+second number missing:
+.ie 42=bad worse
+.el ok
+.PP
+operator "<":
+smaller
+.ie 1<2 (t)
+.el (f)
+equal
+.ie 1<1 (t)
+.el (f)
+greater
+.ie 2<1 (t)
+.el (f)
+.PP
+operator "<=":
+smaller
+.ie 1<=2 (t)
+.el (f)
+equal
+.ie 1<=1 (t)
+.el (f)
+greater
+.ie 2<=1 (t)
+.el (f)
+.PP
+operator "=":
+smaller
+.ie 1=2 (t)
+.el (f)
+equal
+.ie 1=1 (t)
+.el (f)
+greater
+.ie 2=1 (t)
+.el (f)
+.PP
+operator "==":
+smaller
+.ie 1==2 (t)
+.el (f)
+equal
+.ie 1==1 (t)
+.el (f)
+greater
+.ie 2==1 (t)
+.el (f)
+.PP
+operator ">=":
+smaller
+.ie 1>=2 (t)
+.el (f)
+equal
+.ie 1>=1 (t)
+.el (f)
+greater
+.ie 2>=1 (t)
+.el (f)
+.PP
+operator ">":
+smaller
+.ie 1>2 (t)
+.el (f)
+equal
+.ie 1>1 (t)
+.el (f)
+greater
+.ie 2>1 (t)
+.el (f)
+.PP
+with negative numbers:
+mm
+.ie -2<-1 (t)
+.el (f)
+mp
+.ie -2<1 (t)
+.el (f)
+pm
+.ie 1>-2 (t)
+.el (f)
+.PP
+operator "&":
+00
+.ie 0&0 (t)
+.el (f)
+01
+.ie 0&1 (t)
+.el (f)
+10
+.ie 1&0 (t)
+.el (f)
+11
+.ie 1&1 (t)
+.el (f)
+.PP
+operator ":":
+00
+.ie 0:0 (t)
+.el (f)
+01
+.ie 0:1 (t)
+.el (f)
+10
+.ie 1:0 (t)
+.el (f)
+11
+.ie 1:1 (t)
+.el (f)
+.PP
+with scaling units:
+1i>2c
+.ie 1i>2c (t)
+.el (f)
+1i-6P
+.ie 1i-6P (t)
+.el (f)
+.PP
+unmatched parenthesis:
+.ie (
+(t)
+.el (f)
+one
+.ie (1 (t)
+.el (f)
+.PP
+negated unmatched parenthesis:
+.ie !(
+(t)
+.el (f)
+zero
+.ie !(0 (t)
+.el (f)