use strict;
use warnings;
-use Test::More tests => 19 + 2 * 21;
+use Test::More tests => 20 + 2 * 22;
use LaTeX::TikZ;
\draw [color=red] foo ;
RES
+my $foo2 = eval {
+ Tikz->raw('foo')
+ ->mod('->')
+};
+is $@, '', 'creating a modded raw set from a string doesn\'t croak';
+
+check $foo2, 'one modded raw set from a string', <<'RES';
+\draw [->] foo ;
+RES
+
sub failed_valid {
my ($tc) = @_;
qr/Validation failed for '\Q$tc\E'/;
}
eval {
- Tikz->raw('fail')
+ Tikz->raw([ 'fail' ])
->mod(Tikz->raw('epic'));
};
like $@, failed_valid('LaTeX::TikZ::Mod'), 'trying to use a non LTM mod croaks';