File: dates.t

package info (click to toggle)
libcpan-changes-perl 0.500005-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,964 kB
  • sloc: perl: 988; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;
use Test::More;

use CPAN::Changes::Parser;

my $parser = CPAN::Changes::Parser->new;

my $changes = $parser->parse_file('corpus/test/date_formats.changes');

for my $release ($changes->releases) {
    my $date = $release->date;
    my $note = $release->note;
    my ($want) = $note =~ /WANT:(.*)/;
    $want = undef
      if $want eq 'undef';

    is $date, $want, 'correct date for ' . $release->version;
}

done_testing;