From: Vincent Pit Date: Sun, 18 Jul 2010 17:04:45 +0000 (+0200) Subject: Tested flattening of nested modified sets X-Git-Tag: v0.01~47 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=ad9a80bf0294a4f31f7b0ad765f80a81918221d4;p=perl%2Fmodules%2FLaTeX-TikZ.git Tested flattening of nested modified sets This covers LaTeX::TikZ::Scope->flatten. --- diff --git a/t/20-mod.t b/t/20-mod.t index a6c4465..38ab3fe 100644 --- a/t/20-mod.t +++ b/t/20-mod.t @@ -3,7 +3,7 @@ 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; @@ -85,6 +85,18 @@ check $foo, 'one triple modded sequence of raw sets', <<'RES'; \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);