X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=blobdiff_plain;f=t%2F12-recall.t;h=8420cebd93f2be5289d4bceb7d7be901b9abe502;hp=916e7c5820c07c2829d7411f18821b3153243c5e;hb=92b328c090598b186ee6dd5168ca4b5047a834c9;hpb=06a00e8349c4f0c7b7388af0dbfcd562721e8d43 diff --git a/t/12-recall.t b/t/12-recall.t index 916e7c5..8420ceb 100644 --- a/t/12-recall.t +++ b/t/12-recall.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7 + 20 + (($^V ge v5.10.0) ? 4 : 0); +use Test::More tests => 8 + 20 + (($^V ge v5.10.0) ? 4 : 0); use Scalar::Util qw/set_prototype/; use Sub::Prototype::Util qw/recall/; @@ -22,6 +22,8 @@ eval { recall { 'foo' => undef, 'bar' => undef } }; like($@, qr!exactly\s+one\s+key/value\s+pair!, 'recall hashref with 2 pairs croaks'); eval { recall 'hlagh' }; like($@, qr/^Undefined\s+subroutine/, 'recall croaks'); +eval { recall 'for' }; +like($@, qr/^syntax\s+error\s+at\s+\Q$0\E/, 'invalid eval code croaks'); sub noproto { $_[1], $_[0] } sub mytrunc ($;$) { $_[1], $_[0] }