X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftrace.t;h=133c8b07eb0957cbbf474dc5f6be9c26876e5c1e;hb=bedd77c65682815723b5972a79624c91bde6ad42;hp=63338a5b63cde6001a45001a576d7c863589dfc6;hpb=73bca3c94bbb58e0902b693fcdec6b4494f1eb51;p=p5sagit%2FApp-FatPacker.git diff --git a/t/trace.t b/t/trace.t index 63338a5..133c8b0 100755 --- a/t/trace.t +++ b/t/trace.t @@ -6,7 +6,7 @@ use Test::More qw(no_plan); test_trace("t/mod/a.pm" => ("t/mod/b.pm", "t/mod/c.pm")); test_trace("t/mod/b.pm" => ("t/mod/c.pm")); test_trace("t/mod/c.pm" => ()); -test_trace("t/d.pl" => ("t/mod/d.pm")); +test_trace("t/mod/d.pl" => ("t/mod/d.pm")); # Attempts to conditionally load a module that isn't present test_trace("t/mod/cond.pm" => ()); @@ -15,12 +15,14 @@ sub test_trace { my($file, @loaded) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; + unlink "fatpacker.trace"; system($^X, "-Mblib", "-MApp::FatPacker::Trace", $file); open my $trace, "<", "fatpacker.trace"; my @traced = sort map { chomp; $_ } <$trace>; + close $trace; - is_deeply \@loaded, \@traced, "All expected modules loaded for $file"; + is_deeply \@traced, \@loaded, "All expected modules loaded for $file"; unlink "fatpacker.trace"; }