File: 02-basic-dztest.t

package info (click to toggle)
libdist-zilla-util-test-kentnl-perl 1.005014-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 340 kB
  • sloc: perl: 595; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (4)
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
28
29
30
31
32
use strict;
use warnings;

use Test::More;
use Test::DZil qw( simple_ini );
use Dist::Zilla::Util::Test::KENTNL qw( dztest );

# FILENAME: 02-basic-dztest.t
# ABSTRACT: Make sure dztest works

plan tests => 9;

my $test = dztest;
$test->add_file( 'dist.ini', simple_ini( ['GatherDir'] ) );
$test->build_ok;
$test->prereqs_deeply( {} );
$test->has_messages(
  'Simple message check',
  [
    [ qr/beginning\s*to\s*build/imsx, 'Got build log note' ],         ###
    [ qr/writing.*in/imsx,            'Saw \'Writing in\' note' ],    ###
  ],
);
$test->has_message( qr/beginning\s*to\s*build/imsx, 'Got build log note' );
$test->meta_path_deeply( '/prereqs', [ {} ], 'Simple prereqs using dpath' );
$test->meta_path_deeply( '/author/*/*', ['E. Xavier Ample <example@example.org>'], );
$test->test_has_built_file('dist.ini');

ok( -e ( my $file  = $test->source_file('dist.ini') ), 'source file exists' );
ok( -e ( my $xfile = $test->built_file('dist.ini') ),  'built file exists' );
done_testing;