X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F10-simple.t;h=0b17fdeccd149fedaa977c0ee087b8965707a742;hb=da95f9db8211008bbb415d2de11e3616daf4017e;hp=1fdefcd61aa3e8b418e9863eecf5cd38b0b2b229;hpb=20763a0bc2e3d1987ead055b78ef2481aa18514c;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/10-simple.t b/t/10-simple.t index 1fdefcd..0b17fde 100644 --- a/t/10-simple.t +++ b/t/10-simple.t @@ -7,7 +7,7 @@ use Test::More tests => 46; use Variable::Magic qw/wizard gensig getsig cast dispell MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR/; -my $args = 7; +my $args = 8; ++$args if MGf_COPY; ++$args if MGf_DUP; ++$args if MGf_LOCAL; @@ -45,7 +45,7 @@ is($@, '', 're-cast doesn\'t croak'); ok($res, 're-cast is valid'); $res = eval { dispell $a, gensig }; -is($@, '', 're-dispell from wrong sig doesn\'t croak'); +like($@, qr/Invalid\s+wizard\s+object\s+at\s+\Q$0\E/, 're-dispell from wrong sig croaks'); is($res, undef, 're-dispell from wrong sig doesn\'t return anything'); $res = eval { dispell $a, undef };