1 BEGIN { delete $ENV{PERL_STRICTURES_EXTRA} }
3 # -e is sufficient here.
4 -e 't/smells-of-vcs/.git'
5 or mkdir('t/smells-of-vcs/.git')
6 or die "Couldn't create fake .git: $!";
8 use Test::More qw(no_plan);
12 sub capture_stuff { [ $^H, ${^WARNING_BITS} ] }
14 sub capture_us { push @us, capture_stuff }
15 sub capture_expect { push @expect, capture_stuff }
18 BEGIN { $ENV{PERL_STRICTURES_EXTRA} = 0 }
21 BEGIN { delete $ENV{PERL_STRICTURES_EXTRA} }
26 use warnings FATAL => 'all';
27 BEGIN { capture_expect }
30 # I'm assuming here we'll have more cases later. maybe not. eh.
32 foreach my $idx (0 .. $#us) {
33 is($us[$idx][0], $expect[$idx][0], 'Hints ok for case '.($idx+1));
34 is($us[$idx][1], $expect[$idx][1], 'Warnings ok for case '.($idx+1));
38 skip 'Extra tests disabled on perls <= 5.008003', 1
40 skip 'Not got all the modules to do this', 1
43 require multidimensional;
44 require bareword::filehandles;
48 chdir("t/smells-of-vcs");
49 foreach my $file (qw(lib/one.pm t/one.t)) {
50 ok(!eval { require $file; 1 }, "Failed to load ${file}");
51 like($@, qr{Indirect call of method}, "Failed due to indirect.pm, ok");
53 ok(eval { require "other/one.pl"; 1 }, "Loaded other/one.pl ok");
56 ok(!eval q{use strictures 2; 1; }, "Can't use strictures 2 (this is version 1)");