Skip to content

Commit

Permalink
refactor(tests): more format agnostic constructs
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Menke <henri@henrimenke.de>
  • Loading branch information
hmenke committed Dec 17, 2021
1 parent cfc4c1d commit e81f96c
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 1,384 deletions.
22 changes: 8 additions & 14 deletions testfiles/pgf001.latexdvips.tlg
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
============================================================
TEST 1: \pgfpathmoveto
TEST 1: pgf: \pgfpathmoveto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0
.\special{color push gray 0}
.\hbox(0.0+0.0)x0.0
..\glue -28.45274
..\hbox(0.0+0.0)x0.0, shifted 28.45274
Expand All @@ -25,19 +24,16 @@ TEST 1: \pgfpathmoveto
...\special{ps:: pgfc}
...\special{ps::[end]}
...\glue 0.0 plus 1.0fil minus 1.0fil
.\glue 0.0
.\special{color pop}
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
============================================================
TEST 2: \pgfpathlineto
TEST 2: pgf: \pgfpathlineto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0
.\special{color push gray 0}
.\hbox(0.0+0.0)x0.0
..\glue -28.45274
..\hbox(0.0+0.0)x0.0, shifted 28.45274
Expand All @@ -57,10 +53,8 @@ TEST 2: \pgfpathlineto
...\special{ps:: pgfc}
...\special{ps::[end]}
...\glue 0.0 plus 1.0fil minus 1.0fil
.\glue 0.0
.\special{color pop}
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
22 changes: 8 additions & 14 deletions testfiles/pgf001.latexdvisvgm.tlg
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
============================================================
TEST 1: \pgfpathmoveto
TEST 1: pgf: \pgfpathmoveto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0, direction TLT
.\special{color push gray 0}
.\hbox(0.0+0.0)x0.0, direction TLT
..\special{dvisvgm:bbox 0.0 0.0}
..\hbox(0.0+0.0)x0.0, direction TLT
Expand All @@ -26,19 +25,16 @@ TEST 1: \pgfpathmoveto
....\special{dvisvgm:raw </g>}
....\special{color pop}
....\glue 0.0 plus 1.0fil minus 1.0fil
.\glue(\spaceskip) 0.0
.\special{color pop}
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
============================================================
TEST 2: \pgfpathlineto
TEST 2: pgf: \pgfpathlineto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0, direction TLT
.\special{color push gray 0}
.\hbox(0.0+0.0)x0.0, direction TLT
..\special{dvisvgm:bbox 0.0 0.0}
..\hbox(0.0+0.0)x0.0, direction TLT
Expand All @@ -59,10 +55,8 @@ TEST 2: \pgfpathlineto
....\special{dvisvgm:raw </g>}
....\special{color pop}
....\glue 0.0 plus 1.0fil minus 1.0fil
.\glue(\spaceskip) 0.0
.\special{color pop}
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
35 changes: 10 additions & 25 deletions testfiles/pgf001.lvt
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
\documentclass{minimal}
\input{regression-test}
\input{pgf-regression-test}

\RequirePackage{pgf}

\InputIfFileExists{dvisvgm-setup}{}{}

\newsavebox\testbox
\newcommand\test[1]{%
\savebox\testbox{%
\begin{pgfpicture}
#1
\pgfusepathqstroke
\end{pgfpicture}
}%
\begingroup
\showboxbreadth\maxdimen
\showboxdepth\maxdimen
\showbox\testbox
\endgroup
}
\begin{document}

\START

\TEST{\pgfpathmoveto}
{%
\test{\pgfpathmoveto{\pgfpoint{1cm}{1cm}}}%
}
\BEGINPGFTEST{\pgfpathmoveto}
\pgfpathmoveto{\pgfpoint{1cm}{1cm}}
\pgfusepathqstroke
\ENDPGFTEST

\TEST{\pgfpathlineto}
{%
\test{\pgfpathlineto{\pgfpoint{1cm}{1cm}}}%
}
\BEGINPGFTEST{\pgfpathlineto}
\pgfpathlineto{\pgfpoint{1cm}{1cm}}
\pgfusepathqstroke
\ENDPGFTEST

\END
22 changes: 8 additions & 14 deletions testfiles/pgf001.tlg
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
============================================================
TEST 1: \pgfpathmoveto
TEST 1: pgf: \pgfpathmoveto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0
.\pdfcolorstack 0 push {0 g 0 G}
.\hbox(0.0+0.0)x0.0
..\glue -28.45274
..\hbox(0.0+0.0)x0.0, shifted 28.45274
Expand All @@ -21,19 +20,16 @@ TEST 1: \pgfpathmoveto
...\pdfliteral{n }
...\pdfliteral{Q }
...\glue 0.0 plus 1.0fil minus 1.0fil
.\glue 0.0
.\pdfcolorstack 0 pop
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
============================================================
TEST 2: \pgfpathlineto
TEST 2: pgf: \pgfpathlineto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0
.\pdfcolorstack 0 push {0 g 0 G}
.\hbox(0.0+0.0)x0.0
..\glue -28.45274
..\hbox(0.0+0.0)x0.0, shifted 28.45274
Expand All @@ -49,10 +45,8 @@ TEST 2: \pgfpathlineto
...\pdfliteral{n }
...\pdfliteral{Q }
...\glue 0.0 plus 1.0fil minus 1.0fil
.\glue 0.0
.\pdfcolorstack 0 pop
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
22 changes: 8 additions & 14 deletions testfiles/pgf001.xetex.tlg
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
============================================================
TEST 1: \pgfpathmoveto
TEST 1: pgf: \pgfpathmoveto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0
.\special{color push gray 0}
.\hbox(0.0+0.0)x0.0
..\glue -28.45274
..\hbox(0.0+0.0)x0.0, shifted 28.45274
Expand All @@ -23,19 +22,16 @@ TEST 1: \pgfpathmoveto
...\special{pdf:code Q }
...\special{pdf:econtent}
...\glue 0.0 plus 1.0fil minus 1.0fil
.\glue 0.0
.\special{color pop}
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
============================================================
TEST 2: \pgfpathlineto
TEST 2: pgf: \pgfpathlineto
============================================================
> \box...=
\hbox(0.0+0.0)x0.0
.\special{color push gray 0}
.\hbox(0.0+0.0)x0.0
..\glue -28.45274
..\hbox(0.0+0.0)x0.0, shifted 28.45274
Expand All @@ -53,10 +49,8 @@ TEST 2: \pgfpathlineto
...\special{pdf:code Q }
...\special{pdf:econtent}
...\glue 0.0 plus 1.0fil minus 1.0fil
.\glue 0.0
.\special{color pop}
! OK.
\test ...showboxdepth \maxdimen \showbox \testbox
\endgroup
l. ... }
\ENDPGFTEST ...cture \egroup \showbox \PGFTESTBOX
\ENDTEST
l. ...\ENDPGFTEST
============================================================
Loading

0 comments on commit e81f96c

Please sign in to comment.