remove non-working stderr trace test
[p5sagit/App-FatPacker.git] / t / trace.t
CommitLineData
4c401dbc 1use strict;
2use warnings FATAL => 'all';
3use Test::More qw(no_plan);
dc7a3a08 4
5test_trace("t/mod/a.pm" => ("t/mod/b.pm", "t/mod/c.pm"));
6test_trace("t/mod/b.pm" => ("t/mod/c.pm"));
7test_trace("t/mod/c.pm" => ());
50e03dc3 8test_trace("t/mod/d.pl" => ("t/mod/d.pm"));
dc7a3a08 9
10# Attempts to conditionally load a module that isn't present
11test_trace("t/mod/cond.pm" => ());
12
dc7a3a08 13sub test_trace {
14 my($file, @loaded) = @_;
15 local $Test::Builder::Level = $Test::Builder::Level + 1;
16
0c66b552 17 unlink "fatpacker.trace";
dc7a3a08 18 system($^X, "-Mblib", "-MApp::FatPacker::Trace", $file);
19
20 open my $trace, "<", "fatpacker.trace";
73bca3c9 21 my @traced = sort map { chomp; $_ } <$trace>;
bedd77c6 22 close $trace;
dc7a3a08 23
bd483d71 24 is_deeply \@traced, \@loaded, "All expected modules loaded for $file";
dc7a3a08 25 unlink "fatpacker.trace";
26}