1 mkdir('t/smells-of-vcs/.git') or die "Couldn't create fake .git: $!";
3 use Test::More qw(no_plan);
7 sub capture_stuff { [ $^H, ${^WARNING_BITS} ] }
9 sub capture_us { push @us, capture_stuff }
10 sub capture_expect { push @expect, capture_stuff }
19 use warnings FATAL => 'all';
20 BEGIN { capture_expect }
23 # I'm assuming here we'll have more cases later. maybe not. eh.
25 foreach my $idx (0 .. $#us) {
26 is($us[$idx][0], $expect[$idx][0], 'Hints ok for case '.($idx+1));
27 is($us[$idx][1], $expect[$idx][1], 'Warnings ok for case '.($idx+1));
31 local $0 = 't/00load.t';
33 chdir("t/smells-of-vcs");
38 # I don't test $@ here since if indirect isn't installed we hit one
39 # error and if it is we hit another; it's enough the code path's hit.
40 ok(!$r, 'strictures blows up for t/00load.t');
43 ok(!eval q{use strictures 2; 1; }, "Can't use strictures 2 (this is version 1)");