Blame t/read_no-leading-space-for-change.t

Packit 90fbfc
use strict;
Packit 90fbfc
use warnings;
Packit 90fbfc
Packit 90fbfc
use Test::More;
Packit 90fbfc
Packit 90fbfc
use CPAN::Changes;
Packit 90fbfc
Packit 90fbfc
my $changes = CPAN::Changes->load( 't/corpus/no-leading-space-for-change.changes' );
Packit 90fbfc
Packit 90fbfc
isa_ok( $changes, 'CPAN::Changes' );
Packit 90fbfc
is( $changes->preamble, '', 'no preamble' );
Packit 90fbfc
Packit 90fbfc
my @releases = $changes->releases;
Packit 90fbfc
Packit 90fbfc
is( scalar @releases, 1, 'has 1 release' );
Packit 90fbfc
isa_ok( $releases[ 0 ], 'CPAN::Changes::Release' );
Packit 90fbfc
is( $releases[ 0 ]->version, '0.01',       'version' );
Packit 90fbfc
is( $releases[ 0 ]->date,    '2010-06-16', 'date' );
Packit 90fbfc
is_deeply(
Packit 90fbfc
    $releases[ 0 ]->changes,
Packit 90fbfc
    { '' => [ "Initial release This line is part of the first" ] },
Packit 90fbfc
    'full changes'
Packit 90fbfc
);
Packit 90fbfc
is_deeply( [ $releases[ 0 ]->groups ], [ '' ], 'only the main group' );
Packit 90fbfc
is_deeply(
Packit 90fbfc
    $releases[ 0 ]->changes( '' ),
Packit 90fbfc
    [ "Initial release This line is part of the first" ],
Packit 90fbfc
    'one change line'
Packit 90fbfc
);
Packit 90fbfc
Packit 90fbfc
done_testing;