Skip to content

Commit 1ec04ae

Browse files
authored
Merge pull request #374 from titsuki/fix-date-new
Fix RT#127016
2 parents 49ba407 + 287d650 commit 1ec04ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

S32-temporal/Date.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ use Test;
33

44
# L<S32::Temporal/C<Date>>
55

6-
plan 122;
6+
plan 125;
77

88
# construction
99
{
1010
lives-ok { Date.new('2010-01-01') }, 'Date.new("2010-01-01")';
1111
lives-ok { Date.new(2010, 1, 1) }, 'List constructor';
12+
13+
# RT #127016
14+
dies-ok { Date.new(Int, 1, 1) }, 'dies when its year is given as an Int type object';
15+
lives-ok { Date.new(2010, 12/2, 3) }, 'Date.new(2010, 12/2, 3)';
16+
lives-ok { Date.new('2018', '1', '4') }, "Date.new('2018', '1', '4')";
17+
1218
lives-ok { Date.new(:year(2010), :month(1), :day(1)) }, 'named arguments';
1319
lives-ok { Date.today }, 'Date.today';
1420
lives-ok {

0 commit comments

Comments
 (0)