This covers LaTeX::TikZ::Scope->flatten.
use strict;
use warnings;
-use Test::More tests => 13 + 2 * 17;
+use Test::More tests => 14 + 2 * 18;
use LaTeX::TikZ;
use LaTeX::TikZ::Formatter;
\end{scope}
RES
+my $nested = eval {
+ Tikz->seq(
+ Tikz->seq(Tikz->raw("foo"))
+ ->mod($red)
+ )->mod($width)
+};
+is $@, '', 'creating nested modded sequences doesn\'t croak';
+
+check $nested, 'nested modded sequences', <<'RES';
+\draw [line width=4.0pt,color=red] foo ;
+RES
+
my $baz = eval {
Tikz->raw('baz')
->mod($red);