From: Vincent Pit Date: Mon, 19 Jul 2010 09:54:55 +0000 (+0200) Subject: Test mod/clip/layer folding X-Git-Tag: v0.01~40 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=e955781895f97b6ff7ec50270466d459c992e4e1;p=perl%2Fmodules%2FLaTeX-TikZ.git Test mod/clip/layer folding --- diff --git a/t/22-clip.t b/t/22-clip.t index 800be76..b3a1616 100644 --- a/t/22-clip.t +++ b/t/22-clip.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2 + 2 * 9; +use Test::More tests => 2 + 2 * 10; use LaTeX::TikZ; @@ -154,3 +154,28 @@ check $seq2, 'mods folding with clips 7', <<'RES'; \end{scope} RES +$seq2->layer('top'); +$seq->layer('bottom'); + +check $seq2, 'mods folding with clips and layers', <<'RES'; +\begin{pgfonlayer}{top} +\begin{scope} [color=red] +\clip clip2 ; +\begin{scope} +\clip clip1 ; +\begin{pgfonlayer}{bottom} +\begin{scope} [color=red] +\clip clip2 ; +\begin{scope} +\clip clip1 ; +\draw foo ; +\draw bar ; +\end{scope} +\end{scope} +\end{pgfonlayer} +\draw baz ; +\end{scope} +\end{scope} +\end{pgfonlayer} +RES +