summaryrefslogtreecommitdiff
path: root/t/debug.t
blob: e0b8f60817cb320479547cc60f2f3e6792f0259b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl -w

use strict;
use lib 't/lib';
use MBTest tests => 1;

blib_load('Module::Build');

my $tmp = MBTest->tmpdir;

use DistGen;
my $dist = DistGen->new( dir => $tmp );
$dist->regen;
$dist->chdir_in;

#########################

# Test debug output
{
  my $output;
  $output = stdout_of sub { $dist->run_build_pl };
  $output = stdout_of sub { $dist->run_build('--debug') };
  like($output, '/Starting ACTION_build.*?Starting ACTION_code.*?Finished ACTION_code.*?Finished ACTION_build/ms',
    "found nested ACTION_* debug statements"
  );
}