summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-20 23:49:11 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-20 23:49:43 -0700
commit54b894fa875e3ffe8921044e79bd74671f5b5897 (patch)
treee92947ce40d19326f32e3e6be4bfec34b5e3818d
parent608704e1f3b32d0b3448ff076c8516e218a1e022 (diff)
downloadperl-54b894fa875e3ffe8921044e79bd74671f5b5897.tar.gz
Test unpack with no args
to make sure subsequent commits don’t break things.
-rw-r--r--t/comp/bproto.t12
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;