This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get t/uni/cache.t working under minitest
[perl5.git] / t / op / lock.t
CommitLineData
f4df43b5
FC
1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = qw(. ../lib);
6 require './test.pl';
7}
8plan tests => 5;
9
10is \lock $foo, \$foo, 'lock returns a scalar argument';
11is lock @foo, \@foo, 'lock returns a ref to its array argument';
12is lock %foo, \%foo, 'lock returns a ref to its hash argument';
f79aa60b 13is lock &foo, \&foo, 'lock returns a ref to its code argument';
f4df43b5
FC
14
15sub eulavl : lvalue { $x }
f79aa60b 16is lock &eulavl, \&eulavl, 'lock returns a ref to its lvalue sub arg';