diff options
-rw-r--r-- | t/comp/bproto.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/comp/bproto.t b/t/comp/bproto.t index 68b9786f6c..bc0f1a291b 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; |