use strict;
use warnings;
-use Test::More tests => 20 + 2 * 22;
+use Test::More tests => 23 + 2 * 24;
use LaTeX::TikZ;
};
like $@, failed_valid('LaTeX::TikZ::Mod'), 'trying to use a non LTM mod croaks';
+my $scale = eval {
+ Tikz->scale(2);
+};
+is $@, '', 'creating a scale mod doesn\'t croak';
+
+$foo2 = eval {
+ Tikz->raw('foo')
+ ->mod($scale);
+};
+is $@, '', 'applying a scale mod doesn\'t croak';
+
+check $foo2, 'a raw set with a scale mod', <<'RES';
+\draw [scale=2.000] foo ;
+RES
+
+$foo2 = eval {
+ Tikz->union(
+ Tikz->raw('foo')
+ ->mod($scale),
+ )->mod(Tikz->scale(4));
+};
+is $@, '', 'applying two scale mods doesn\'t croak';
+
+check $foo2, 'a union of a raw set with two scale mods', <<'RES';
+\draw [scale=4.000] foo ;
+RES
+
my $width = eval {
Tikz->width(25);
};