]> git.vpit.fr Git - perl/modules/Sub-Prototype-Util.git/blobdiff - t/12-recall.t
Fix some croak backtraces
[perl/modules/Sub-Prototype-Util.git] / t / 12-recall.t
index 916e7c5820c07c2829d7411f18821b3153243c5e..8420cebd93f2be5289d4bceb7d7be901b9abe502 100644 (file)
@@ -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 <unknown> 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] }