This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test unpack with no args
[perl5.git]
/
t
/
comp
/
bproto.t
diff --git
a/t/comp/bproto.t
b/t/comp/bproto.t
index
68b9786
..
bc0f1a2
100644
(file)
--- a/
t/comp/bproto.t
+++ b/
t/comp/bproto.t
@@
-8,7
+8,7
@@
BEGIN {
@INC = '../lib';
}
@INC = '../lib';
}
-print "1..1
3
\n";
+print "1..1
4
\n";
my $i = 1;
my $i = 1;
@@
-21,6
+21,12
@@
sub test_too_many {
printf "ok %d\n",$i++;
}
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 $@;
sub test_no_error {
eval $_[0];
print "not " if $@;
@@
-33,6
+39,10
@@
q[ defined(&foo, $bar);
uc($bar,$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;
test_no_error($_) for split /\n/,
q[ scalar(&foo,$bar);
defined &foo, &foo, &foo;