From: schwarze Date: Thu, 1 Jan 2015 12:53:46 +0000 (+0000) Subject: eqn(7) tests X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=08d5dbf19571f4526e107d63ae260831c1e79b6f;p=openbsd eqn(7) tests --- diff --git a/regress/usr.bin/mandoc/eqn/Makefile b/regress/usr.bin/mandoc/eqn/Makefile new file mode 100644 index 00000000000..f84e16c641d --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +SUBDIR = fromto matrix nullary over size subsup unary + +.include "../Makefile.sub" +.include diff --git a/regress/usr.bin/mandoc/eqn/Makefile.inc b/regress/usr.bin/mandoc/eqn/Makefile.inc new file mode 100644 index 00000000000..0f4095df114 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/Makefile.inc @@ -0,0 +1,26 @@ +# $OpenBSD: Makefile.inc,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +EQN = /usr/local/bin/eqn + +SKIP_GROFF ?= ${REGRESS_TARGETS} +SKIP_TMAN ?= ALL SILENT + +_FULLHTMLFILES = ${HTML_TARGETS:S/$/.html/} + +html-clean: +.if !empty(_FULLHTMLFILES) + rm -f ${_HTMLFILES} ${_FULLHTMLFILES} +.endif + +.for t in ${HTML_TARGETS} +${t}.out_html: ${t}.in + ${MANDOC} ${MOPTS} -Thtml ${.ALLSRC} | \ + ${.CURDIR}/../extract.pl > ${.TARGET} +.endfor + +.include "../Makefile.inc" + +.in.mandoc_html: + ${MANDOC} ${MOPTS} -Thtml ${.IMPSRC} > ${.TARGET:S/mandoc_html$/html/} + @echo "extract.pl < ${.TARGET:S/mandoc_html$/html/} > ${.TARGET}" + @${.CURDIR}/../extract.pl < ${.TARGET:S/mandoc_html$/html/} > ${.TARGET} diff --git a/regress/usr.bin/mandoc/eqn/extract.pl b/regress/usr.bin/mandoc/eqn/extract.pl new file mode 100755 index 00000000000..60e9d643839 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/extract.pl @@ -0,0 +1,19 @@ +#!/usr/bin/perl +use warnings; +use strict; + +my ($begun, $ended); + +while (<>) { + chomp; + if (not $begun) { + s/.*// or next; + $begun = 1; + next unless length; + } + s/<\/math>.*// and $ended = 1; + print "$_\n" if length; + exit 0 if $ended; +} + +die "unexpected end of file"; diff --git a/regress/usr.bin/mandoc/eqn/fromto/Makefile b/regress/usr.bin/mandoc/eqn/fromto/Makefile new file mode 100644 index 00000000000..a48306f24dc --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/fromto/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +REGRESS_TARGETS = basic +HTML_TARGETS = basic + +.include diff --git a/regress/usr.bin/mandoc/eqn/fromto/basic.in b/regress/usr.bin/mandoc/eqn/fromto/basic.in new file mode 100644 index 00000000000..5d42605aeaf --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/fromto/basic.in @@ -0,0 +1,12 @@ +.Dd January 1, 2015 +.Dt FROMTO-BASIC 1 +.Os OpenBSD +.Sh NAME +.Nm fromto-basic +.Nd vertical stacking +.Sh DESCRIPTION +initial text +.EQ +sum from { i = 1 } to inf 1 over i sup 2 +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/fromto/basic.out_ascii b/regress/usr.bin/mandoc/eqn/fromto/basic.out_ascii new file mode 100644 index 00000000000..1c3105d444c --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/fromto/basic.out_ascii @@ -0,0 +1,9 @@ +FROMTO-BASIC(1) General Commands Manual FROMTO-BASIC(1) + +NNAAMMEE + ffrroommttoo--bbaassiicc - vertical stacking + +DDEESSCCRRIIPPTTIIOONN + initial text E_(i = 1)^oo 1/i^2 final text + +OpenBSD January 1, 2015 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/fromto/basic.out_html b/regress/usr.bin/mandoc/eqn/fromto/basic.out_html new file mode 100644 index 00000000000..700edcc2cd5 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/fromto/basic.out_html @@ -0,0 +1 @@ +i=11i2 diff --git a/regress/usr.bin/mandoc/eqn/matrix/Makefile b/regress/usr.bin/mandoc/eqn/matrix/Makefile new file mode 100644 index 00000000000..a48306f24dc --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/matrix/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +REGRESS_TARGETS = basic +HTML_TARGETS = basic + +.include diff --git a/regress/usr.bin/mandoc/eqn/matrix/basic.in b/regress/usr.bin/mandoc/eqn/matrix/basic.in new file mode 100644 index 00000000000..d7beea0d6ff --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/matrix/basic.in @@ -0,0 +1,17 @@ +.Dd October 10, 2014 +.Dt MATRIX-BASIC 1 +.Os OpenBSD +.Sh NAME +.Nm matrix-basic +.Nd matrixes in equations +.Sh DESCRIPTION +initial text +.EQ +left ( +matrix { ccol { a sub 11 above a sub 21 } ccol { a sub 12 above a sub 22 } } +right ) +left ( +pile { b sub 1 above b sub 2 } +right ) +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/matrix/basic.out_ascii b/regress/usr.bin/mandoc/eqn/matrix/basic.out_ascii new file mode 100644 index 00000000000..b510090673a --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/matrix/basic.out_ascii @@ -0,0 +1,9 @@ +MATRIX-BASIC(1) General Commands Manual MATRIX-BASIC(1) + +NNAAMMEE + mmaattrriixx--bbaassiicc - matrixes in equations + +DDEESSCCRRIIPPTTIIOONN + initial text ((a_11 a_21) (a_12 a_22)) (b_1 b_2) final text + +OpenBSD October 10, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/matrix/basic.out_html b/regress/usr.bin/mandoc/eqn/matrix/basic.out_html new file mode 100644 index 00000000000..d33b6b2d47e --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/matrix/basic.out_html @@ -0,0 +1 @@ +a11a12a21a22b1b2 diff --git a/regress/usr.bin/mandoc/eqn/nullary/Makefile b/regress/usr.bin/mandoc/eqn/nullary/Makefile new file mode 100644 index 00000000000..ec5dfa06caa --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/nullary/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +REGRESS_TARGETS = roman +HTML_TARGETS = roman + +.include diff --git a/regress/usr.bin/mandoc/eqn/nullary/roman.in b/regress/usr.bin/mandoc/eqn/nullary/roman.in new file mode 100644 index 00000000000..f4a081f1470 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/nullary/roman.in @@ -0,0 +1,14 @@ +.Dd October 12, 2014 +.Dt NULLARY-ROMAN 1 +.Os OpenBSD +.Sh NAME +.Nm nullary-roman +.Nd equation tokens set in roman font +.Sh DESCRIPTION +initial text +.EQ +sin cos tan sinh cosh tanh arc +max min lim log ln exp +Re Im and if for det +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/nullary/roman.out_ascii b/regress/usr.bin/mandoc/eqn/nullary/roman.out_ascii new file mode 100644 index 00000000000..cc6ff3a8028 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/nullary/roman.out_ascii @@ -0,0 +1,10 @@ +NULLARY-ROMAN(1) General Commands Manual NULLARY-ROMAN(1) + +NNAAMMEE + nnuullllaarryy--rroommaann - equation tokens set in roman font + +DDEESSCCRRIIPPTTIIOONN + initial text sin cos tan sinh cosh tanh arc max min lim log ln exp Re Im + and if for det final text + +OpenBSD October 12, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/nullary/roman.out_html b/regress/usr.bin/mandoc/eqn/nullary/roman.out_html new file mode 100644 index 00000000000..115daa05ef9 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/nullary/roman.out_html @@ -0,0 +1 @@ +sincostansinhcoshtanharcmaxminlimloglnexpReImandiffordet diff --git a/regress/usr.bin/mandoc/eqn/over/Makefile b/regress/usr.bin/mandoc/eqn/over/Makefile new file mode 100644 index 00000000000..1933faf64f0 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/over/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +REGRESS_TARGETS = precedence +HTML_TARGETS = precedence + +.include diff --git a/regress/usr.bin/mandoc/eqn/over/precedence.in b/regress/usr.bin/mandoc/eqn/over/precedence.in new file mode 100644 index 00000000000..2386ff8c2eb --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/over/precedence.in @@ -0,0 +1,12 @@ +.Dd October 10, 2014 +.Dt OVER-PRECEDENCE 1 +.Os OpenBSD +.Sh NAME +.Nm over-precedence +.Nd precedence of the fraction operator +.Sh DESCRIPTION +initial text +.EQ +1 + x + x sup 2 over 2 + x sup 3 over { 2 * 3 } +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/over/precedence.out_ascii b/regress/usr.bin/mandoc/eqn/over/precedence.out_ascii new file mode 100644 index 00000000000..3e930019d69 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/over/precedence.out_ascii @@ -0,0 +1,9 @@ +OVER-PRECEDENCE(1) General Commands Manual OVER-PRECEDENCE(1) + +NNAAMMEE + oovveerr--pprreecceeddeennccee - precedence of the fraction operator + +DDEESSCCRRIIPPTTIIOONN + initial text 1 + x + x^2/2 + x^3/(2 * 3) final text + +OpenBSD October 10, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/over/precedence.out_html b/regress/usr.bin/mandoc/eqn/over/precedence.out_html new file mode 100644 index 00000000000..c0128021b3f --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/over/precedence.out_html @@ -0,0 +1 @@ +1+x+x22+x32*3 diff --git a/regress/usr.bin/mandoc/eqn/size/Makefile b/regress/usr.bin/mandoc/eqn/size/Makefile new file mode 100644 index 00000000000..eba7d657b61 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/size/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +REGRESS_TARGETS = basic + +.include diff --git a/regress/usr.bin/mandoc/eqn/size/basic.in b/regress/usr.bin/mandoc/eqn/size/basic.in new file mode 100644 index 00000000000..af9b20e883e --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/size/basic.in @@ -0,0 +1,12 @@ +.Dd October 10, 2014 +.Dt SIZE-BASIC 1 +.Os OpenBSD +.Sh NAME +.Nm size-basic +.Nd font sizes +.Sh DESCRIPTION +initial text +.EQ +x size 12 x size 14 x size 16 x +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/size/basic.out_ascii b/regress/usr.bin/mandoc/eqn/size/basic.out_ascii new file mode 100644 index 00000000000..3177a1b5568 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/size/basic.out_ascii @@ -0,0 +1,9 @@ +SIZE-BASIC(1) General Commands Manual SIZE-BASIC(1) + +NNAAMMEE + ssiizzee--bbaassiicc - font sizes + +DDEESSCCRRIIPPTTIIOONN + initial text x x x x final text + +OpenBSD October 10, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/subsup/Makefile b/regress/usr.bin/mandoc/eqn/subsup/Makefile new file mode 100644 index 00000000000..22299589af7 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/subsup/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +REGRESS_TARGETS = combine sub_group +HTML_TARGETS = combine sub_group + +.include diff --git a/regress/usr.bin/mandoc/eqn/subsup/combine.in b/regress/usr.bin/mandoc/eqn/subsup/combine.in new file mode 100644 index 00000000000..1fdedd4e6f2 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/subsup/combine.in @@ -0,0 +1,12 @@ +.Dd October 10, 2014 +.Dt SUBSUP-COMBINE 1 +.Os OpenBSD +.Sh NAME +.Nm subsup-combine +.Nd combination of subscripts and superscripts +.Sh DESCRIPTION +initial text +.EQ +x sub 1 sup 2 + e sup x sub 2 +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/subsup/combine.out_ascii b/regress/usr.bin/mandoc/eqn/subsup/combine.out_ascii new file mode 100644 index 00000000000..945a4ad3fa9 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/subsup/combine.out_ascii @@ -0,0 +1,9 @@ +SUBSUP-COMBINE(1) General Commands Manual SUBSUP-COMBINE(1) + +NNAAMMEE + ssuubbssuupp--ccoommbbiinnee - combination of subscripts and superscripts + +DDEESSCCRRIIPPTTIIOONN + initial text x_1^2 + e^x_2 final text + +OpenBSD October 10, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/subsup/combine.out_html b/regress/usr.bin/mandoc/eqn/subsup/combine.out_html new file mode 100644 index 00000000000..6e2c7de2158 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/subsup/combine.out_html @@ -0,0 +1 @@ +x12+ex2 diff --git a/regress/usr.bin/mandoc/eqn/subsup/sub_group.in b/regress/usr.bin/mandoc/eqn/subsup/sub_group.in new file mode 100644 index 00000000000..67a2de2b18a --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/subsup/sub_group.in @@ -0,0 +1,12 @@ +.Dd October 10, 2014 +.Dt SUBSUP-SUB_GROUP 1 +.Os OpenBSD +.Sh NAME +.Nm subsup-sub_group +.Nd grouping of subscripts +.Sh DESCRIPTION +initial text +.EQ +x sub i + x sub j sub 1 + { M sub i } sub j +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/subsup/sub_group.out_ascii b/regress/usr.bin/mandoc/eqn/subsup/sub_group.out_ascii new file mode 100644 index 00000000000..8de3c874d42 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/subsup/sub_group.out_ascii @@ -0,0 +1,9 @@ +SUBSUP-SUB_GROUP(1) General Commands Manual SUBSUP-SUB_GROUP(1) + +NNAAMMEE + ssuubbssuupp--ssuubb__ggrroouupp - grouping of subscripts + +DDEESSCCRRIIPPTTIIOONN + initial text x_i + x_j_1 + (M_i)_j final text + +OpenBSD October 10, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/subsup/sub_group.out_html b/regress/usr.bin/mandoc/eqn/subsup/sub_group.out_html new file mode 100644 index 00000000000..dad7c4062f6 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/subsup/sub_group.out_html @@ -0,0 +1 @@ +xi+xj1+Mij diff --git a/regress/usr.bin/mandoc/eqn/unary/Makefile b/regress/usr.bin/mandoc/eqn/unary/Makefile new file mode 100644 index 00000000000..f68a5ce7f65 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/unary/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $ + +REGRESS_TARGETS = diacrit sqrt +HTML_TARGETS = diacrit sqrt + +.include diff --git a/regress/usr.bin/mandoc/eqn/unary/diacrit.in b/regress/usr.bin/mandoc/eqn/unary/diacrit.in new file mode 100644 index 00000000000..bb50774b0f9 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/unary/diacrit.in @@ -0,0 +1,13 @@ +.Dd October 10, 2014 +.Dt UNARY-DIACRIT 1 +.Os OpenBSD +.Sh NAME +.Nm unary-diacrit +.Nd diacritical marks in equations +.Sh DESCRIPTION +initial text +.EQ +x dot x dotdot x hat x tilde x vec x dyad +{ x + y } bar { x + y } under +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/unary/diacrit.out_ascii b/regress/usr.bin/mandoc/eqn/unary/diacrit.out_ascii new file mode 100644 index 00000000000..54a35c3c39a --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/unary/diacrit.out_ascii @@ -0,0 +1,9 @@ +UNARY-DIACRIT(1) General Commands Manual UNARY-DIACRIT(1) + +NNAAMMEE + uunnaarryy--ddiiaaccrriitt - diacritical marks in equations + +DDEESSCCRRIIPPTTIIOONN + initial text x. x" x^ x~ x-> x<-> (x + y) (x + y)_ final text + +OpenBSD October 10, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/unary/diacrit.out_html b/regress/usr.bin/mandoc/eqn/unary/diacrit.out_html new file mode 100644 index 00000000000..076c6663968 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/unary/diacrit.out_html @@ -0,0 +1 @@ +x˙x¨x^x~xxx+yx+y_ diff --git a/regress/usr.bin/mandoc/eqn/unary/sqrt.in b/regress/usr.bin/mandoc/eqn/unary/sqrt.in new file mode 100644 index 00000000000..359c3d7b664 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/unary/sqrt.in @@ -0,0 +1,12 @@ +.Dd October 10, 2014 +.Dt UNARY-SQRT 1 +.Os OpenBSD +.Sh NAME +.Nm unary-sqrt +.Nd square root +.Sh DESCRIPTION +initial text +.EQ +r = sqrt { x sup 2 + y sup 2 } +.EN +final text diff --git a/regress/usr.bin/mandoc/eqn/unary/sqrt.out_ascii b/regress/usr.bin/mandoc/eqn/unary/sqrt.out_ascii new file mode 100644 index 00000000000..104df229b53 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/unary/sqrt.out_ascii @@ -0,0 +1,9 @@ +UNARY-SQRT(1) General Commands Manual UNARY-SQRT(1) + +NNAAMMEE + uunnaarryy--ssqqrrtt - square root + +DDEESSCCRRIIPPTTIIOONN + initial text r = sqrt(x^2 + y^2) final text + +OpenBSD October 10, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/eqn/unary/sqrt.out_html b/regress/usr.bin/mandoc/eqn/unary/sqrt.out_html new file mode 100644 index 00000000000..b868474dfb7 --- /dev/null +++ b/regress/usr.bin/mandoc/eqn/unary/sqrt.out_html @@ -0,0 +1 @@ +r=x2+y2