File: days_till_x.t

package info (click to toggle)
libdatetime-calendar-discordian-perl 1.0-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 188 kB
  • sloc: perl: 803; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 472 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl
use warnings;
use strict;
use Test::More;
use DateTime::Calendar::Discordian;

my @dates = (
    {season => 'Confusion', day => 1, year => 0, tillx => 3_589_277},
    {season => 'Confusion', day => 40, year => 9827, tillx => 0},
);

my $i = 1;
foreach my $d (@dates) {
    is(DateTime::Calendar::Discordian->new
      (season => $d->{season}, day => $d->{day}, year => $d->{year})->days_till_x, 
      $d->{tillx}, "date $i");
    $i++;
}

done_testing();