3 use warnings FATAL => 'all';
4 use Test::More qw(no_plan);
6 test_trace("t/mod/a.pm" => ("t/mod/b.pm", "t/mod/c.pm"));
7 test_trace("t/mod/b.pm" => ("t/mod/c.pm"));
8 test_trace("t/mod/c.pm" => ());
10 # Attempts to conditionally load a module that isn't present
11 test_trace("t/mod/cond.pm" => ());
14 my($file, @loaded) = @_;
15 local $Test::Builder::Level = $Test::Builder::Level + 1;
17 system($^X, "-Mblib", "-MApp::FatPacker::Trace", $file);
19 open my $trace, "<", "fatpacker.trace";
23 @loaded = grep { $load ne $_ } @loaded;
26 ok !@loaded, "All expected modules loaded for $file";
27 unlink "fatpacker.trace";