summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/usr.bin/mandoc/roff/cond/Makefile4
-rw-r--r--regress/usr.bin/mandoc/roff/cond/numeric.in100
-rw-r--r--regress/usr.bin/mandoc/roff/cond/numeric.out_ascii31
3 files changed, 133 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/roff/cond/Makefile b/regress/usr.bin/mandoc/roff/cond/Makefile
index aea6c49fe38..6f4f653b392 100644
--- a/regress/usr.bin/mandoc/roff/cond/Makefile
+++ b/regress/usr.bin/mandoc/roff/cond/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.3 2013/06/27 09:48:23 schwarze Exp $
+# $OpenBSD: Makefile,v 1.4 2013/10/04 02:19:47 schwarze Exp $
-REGRESS_TARGETS=if ie close before-Dd
+REGRESS_TARGETS = if ie close numeric before-Dd
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/roff/cond/numeric.in b/regress/usr.bin/mandoc/roff/cond/numeric.in
new file mode 100644
index 00000000000..88e048a271b
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/numeric.in
@@ -0,0 +1,100 @@
+.TH COND-NUMERIC 1 "October 3, 2013" 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)
diff --git a/regress/usr.bin/mandoc/roff/cond/numeric.out_ascii b/regress/usr.bin/mandoc/roff/cond/numeric.out_ascii
new file mode 100644
index 00000000000..6db189ac75b
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/numeric.out_ascii
@@ -0,0 +1,31 @@
+COND-NUMERIC(1) OpenBSD Reference Manual COND-NUMERIC(1)
+
+
+
+NNAAMMEE
+ cond-numeric - roff conditions involving numbers
+
+DDEESSCCRRIIPPTTIIOONN
+ positive number: plain (t) negated (f)
+
+ negative number: plain (f) negated (t)
+
+ second number missing: ok
+
+ operator "<": smaller (t) equal (f) greater (f)
+
+ operator "<=": smaller (t) equal (t) greater (f)
+
+ operator "=": smaller (f) equal (t) greater (f)
+
+ operator "==": smaller (f) equal (t) greater (f)
+
+ operator ">=": smaller (f) equal (t) greater (t)
+
+ operator ">": smaller (f) equal (f) greater (t)
+
+ with negative numbers: mm (t) mp (t) pm (t)
+
+
+
+OpenBSD October 3, 2013 COND-NUMERIC(1)