Skip to content

Commit

Permalink
feat(tests): generate tests from manual examples
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Menke <[email protected]>
  • Loading branch information
hmenke committed Dec 19, 2021
1 parent 05f2026 commit 7bfdb16
Show file tree
Hide file tree
Showing 96 changed files with 28,337 additions and 0 deletions.
179 changes: 179 additions & 0 deletions testfiles/pgfmanual-en-base-actions.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
\documentclass{minimal}
\input{pgf-regression-test}
\RequirePackage{fp,pgf,tikz,xcolor}

\usepgflibrary{arrows.meta}
\usepgflibrary{arrows.meta}
\usepgflibrary{arrows.meta}
\usepgflibrary{arrows.meta}

\begin{document}

\BEGINBOXTEST{pgfmanual-en-base-actions-1}
\begin{pgfpicture}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{1cm}}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfusepath{fill}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-2}
\begin{pgfpicture}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{1cm}}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-3}
\begin{pgfpicture}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{1cm}}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfusepath{stroke,clip}
\pgfpathcircle{\pgfpoint{1cm}{1cm}}{0.5cm}
\pgfusepath{fill}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-4}
\begin{pgfpicture}
\pgfsetlinewidth{1mm}
\pgfpathmoveto{\pgfpoint{0mm}{0mm}}
\pgfpathlineto{\pgfpoint{2cm}{0mm}}
\pgfusepath{stroke}
\pgfsetlinewidth{2\pgflinewidth} % double in size
\pgfpathmoveto{\pgfpoint{0mm}{5mm}}
\pgfpathlineto{\pgfpoint{2cm}{5mm}}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-5}
\begin{pgfpicture}
\pgfsetdash{{0.5cm}{0.5cm}{0.1cm}{0.2cm}}{0cm}
\pgfpathmoveto{\pgfpoint{0mm}{0mm}}
\pgfpathlineto{\pgfpoint{2cm}{0mm}}
\pgfusepath{stroke}
\pgfsetdash{{0.5cm}{0.5cm}{0.1cm}{0.2cm}}{0.1cm}
\pgfpathmoveto{\pgfpoint{0mm}{1mm}}
\pgfpathlineto{\pgfpoint{2cm}{1mm}}
\pgfusepath{stroke}
\pgfsetdash{{0.5cm}{0.5cm}{0.1cm}{0.2cm}}{0.2cm}
\pgfpathmoveto{\pgfpoint{0mm}{2mm}}
\pgfpathlineto{\pgfpoint{2cm}{2mm}}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-6}
\begin{pgfpicture}
\pgfsetlinewidth{1pt}
\color{red}
\pgfpathcircle{\pgfpoint{0cm}{0cm}}{3mm} \pgfusepath{fill,stroke}
\pgfsetstrokecolor{black}
\pgfpathcircle{\pgfpoint{1cm}{0cm}}{3mm} \pgfusepath{fill,stroke}
\color{red}
\pgfpathcircle{\pgfpoint{2cm}{0cm}}{3mm} \pgfusepath{fill,stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-7}
\begin{pgfpicture}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{1cm}}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfsetlinewidth{2pt}
\pgfsetinnerlinewidth{1pt}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-8}
\begin{pgfpicture}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{1cm}}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfsetlinewidth{2pt}
\pgfsetinnerlinewidth{1pt}
\pgfsetinnerstrokecolor{red!50}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-9}
\begin{pgfpicture}
\pgfsetarrowsstart{Latex[length=10pt]}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfusepath{stroke}
\pgfsetarrowsstart{Computer Modern Rightarrow}
\pgfpathmoveto{\pgfpoint{0cm}{2mm}}
\pgfpathlineto{\pgfpoint{1cm}{2mm}}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-10}
\begin{pgfpicture}
\pgfsetarrowsstart{Latex[length=10pt]}
\pgfsetarrowsend{Computer Modern Rightarrow}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-11}
\begin{pgfpicture}
\pgfsetarrows{Latex[length=10pt]->>}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{1cm}{0cm}}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-12}
\begin{pgfpicture}
\pgfpathcircle{\pgfpointorigin}{5mm}
\pgfusepath{stroke}
\pgfsetarrows{Latex-}
\pgfsetshortenstart{4pt}
\pgfpathmoveto{\pgfpoint{5mm}{0cm}} % would be on the circle
\pgfpathlineto{\pgfpoint{2cm}{0cm}}
\pgfusepath{stroke}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-13}
\begin{pgfpicture}
\pgfseteorule
\pgfpathcircle{\pgfpoint{0mm}{0cm}}{7mm}
\pgfpathcircle{\pgfpoint{5mm}{0cm}}{7mm}
\pgfusepath{fill}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-14}
\begin{pgfpicture}
\pgfsetnonzerorule
\pgfpathcircle{\pgfpoint{0mm}{0cm}}{7mm}
\pgfpathcircle{\pgfpoint{5mm}{0cm}}{7mm}
\pgfusepath{fill}
\end{pgfpicture}
\ENDBOXTEST

\BEGINBOXTEST{pgfmanual-en-base-actions-15}
Left
\begin{pgfpicture}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{2ex}{1ex}}
\pgfusepath{use as bounding box} % draws nothing

\pgfpathcircle{\pgfpointorigin}{2ex}
\pgfusepath{stroke}
\end{pgfpicture}
right.
\ENDBOXTEST
\END
Loading

0 comments on commit 7bfdb16

Please sign in to comment.