diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-10-04 02:19:48 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-10-04 02:19:48 +0000 |
commit | afa12a9cf06aa4ac4ec8ae90f53023a7d693f123 (patch) | |
tree | 3bbd2bf6db602f2dc6aa00a83af4d1948b30cf99 /regress | |
parent | 41396c1fe7862453e67b51b100d8f39b31ad839b (diff) |
Test numerical conditions; related to roff.c rev. 1.56.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/mandoc/roff/cond/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/cond/numeric.in | 100 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/cond/numeric.out_ascii | 31 |
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) |