File: debian-558272.t

package info (click to toggle)
libdate-calc-xs-perl 6.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 812 kB
  • sloc: perl: 7,397; ansic: 2,607; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 422 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /usr/bin/perl

use strict;
use warnings;

use Test::More 0.88;
use Test::Exception;

use_ok("Date::Calc");

my $string = "Oct";
$string =~ /(.*)/;
lives_and { is Date::Calc::Decode_Month($1), 10 } 'Decode_Month($1) works';

{
  package
    Foo;
  use overload '""' => sub { "Nov" };
}
my $foo = bless {}, 'Foo';
lives_and { is Date::Calc::Decode_Month($foo), 11 } 'Decode_Month() works with overload';

done_testing();