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