X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/608704e1f3b32d0b3448ff076c8516e218a1e022..54b894fa875e3ffe8921044e79bd74671f5b5897:/t/comp/bproto.t diff --git a/t/comp/bproto.t b/t/comp/bproto.t index 68b9786..bc0f1a2 100644 --- a/t/comp/bproto.t +++ b/t/comp/bproto.t @@ -8,7 +8,7 @@ BEGIN { @INC = '../lib'; } -print "1..13\n"; +print "1..14\n"; my $i = 1; @@ -21,6 +21,12 @@ sub test_too_many { printf "ok %d\n",$i++; } +sub test_too_few { + eval $_[0]; + print "not " unless $@ =~ /^Not enough arguments/; + printf "ok %d\n",$i++; +} + sub test_no_error { eval $_[0]; print "not " if $@; @@ -33,6 +39,10 @@ q[ defined(&foo, $bar); uc($bar,$bar); ]; +test_too_few($_) for split /\n/, +q[ unpack; +]; + test_no_error($_) for split /\n/, q[ scalar(&foo,$bar); defined &foo, &foo, &foo;