File: import.t

package info (click to toggle)
libdatetime-format-strptime-perl 1.7900-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 6,812 kB
  • sloc: perl: 1,400; sh: 23; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 541 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
21
22
23
24
25
26
27
28
use strict;
use warnings;

# We need this to be set to catch warning from inside other packages.
BEGIN {
    ## no critic (Variables::RequireLocalizedPunctuationVars)
    $^W = 1;
}

use Test::More;
use Test::Warnings qw( warnings );

use DateTime::Format::Strptime qw( strftime strptime ),
    -api_version => '1.55';

is(
    strptime( '%Y', '2005' )->year,
    2005,
    'export strptime works as expected'
);

is(
    strftime( '%Y', DateTime->new( year => 2005 ) ),
    2005,
    'export strftime works as expected'
);

done_testing();