4 use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
8 use_ok 'Module::Build';
9 ensure_blib('Module::Build');
11 my $tmp = MBTest->tmpdir;
12 my $dist = DistGen->new( dir => $tmp );
14 $dist->add_file('t/mytest.s', <<'---' );
16 use Test::More tests => 2;
17 ok(1, 'first mytest.s');
18 ok(1, 'second mytest.s');
24 #########################
26 # So make sure that the test gets run with the alternate extension.
27 ok my $mb = Module::Build->new(
28 module_name => $dist->name,
29 test_file_exts => ['.s'],
31 ), 'Construct build object with test_file_exts parameter';
33 $mb->add_to_cleanup('save_out');
34 # Use uc() so we don't confuse the current test output
35 my $out = uc(stdout_of(
36 sub {$mb->dispatch('test', verbose => 1)}
39 like $out, qr/^OK 1 - FIRST MYTEST[.]S/m, 'Should see first test output';
40 like $out, qr/^OK 2 - SECOND MYTEST[.]S/m, 'Should see second test output';
45 # vim:ts=4:sw=4:et:sta