summaryrefslogtreecommitdiff
path: root/t/op/lock.t
blob: c40ec4c9fd0869debffe499f3e65fbae9f53d6c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!./perl

BEGIN {
    chdir 't' if -d 't';
    @INC = qw(. ../lib);
    require './test.pl';
}
plan tests => 5;

is \lock $foo, \$foo, 'lock returns a scalar argument';
is  lock @foo, \@foo, 'lock returns a ref to its array argument';
is  lock %foo, \%foo, 'lock returns a ref to its hash argument';
is  lock &foo, \&foo, 'lock returns a ref to its code argument';

sub eulavl : lvalue { $x }
is  lock &eulavl, \&eulavl, 'lock returns a ref to its lvalue sub arg';