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