ensure all tests have a plan
[p5sagit/local-lib.git] / t / coderefs_in_inc.t
CommitLineData
2b12c1b8 1use strict;
2use warnings;
7487778d 3use Test::More tests => 2;
2b12c1b8 4use File::Temp qw(tempdir);
5use Cwd;
6
7# Test that refs in @INC don't get mangled.
8
2b12c1b8 9
10my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1);
11
12use local::lib ();
13my $code = sub {};
14push(@INC, $code);
15local::lib->import($dir);
16ok grep({ $_ eq $code } @INC), 'Can find code ref in @INC';
17ok grep({ ref $_ } @INC), 'It really is a ref, not stringified';
18