use strict;
use warnings;
-use Test::More tests => 2 + 2 * 9;
+use Test::More tests => 2 + 2 * 10;
use LaTeX::TikZ;
\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
+