summaryrefslogtreecommitdiff
path: root/t/comp/proto.t
diff options
context:
space:
mode:
Diffstat (limited to 't/comp/proto.t')
-rwxr-xr-xt/comp/proto.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/comp/proto.t b/t/comp/proto.t
index d1cfede8af..080110bdcc 100755
--- a/t/comp/proto.t
+++ b/t/comp/proto.t
@@ -362,17 +362,18 @@ printf "ok %d\n",$i++;
##
##
-testing \&an_array_ref, '\@';
+testing \&array_ref_plus, '\@@';
-sub an_array_ref (\@) {
+sub array_ref_plus (\@@) {
print "# \@_ = (",join(",",@_),")\n";
- print "not " unless ref($_[0]) && 1 == @{$_[0]};
+ print "not " unless @_ == 2 && ref($_[0]) && 1 == @{$_[0]} && $_[1] eq 'x';
printf "ok %d\n",$i++;
@{$_[0]} = (qw(ok)," ",$i++,"\n");
}
@array = ('a');
-an_array_ref @array;
+{ my @more = ('x');
+ array_ref_plus @array, @more; }
print "not " unless @array == 4;
print @array;