Skip to content

Commit

Permalink
Make sure both Date.new(2010, 12/2, 3) and Date.new('2018', '1', '4')…
Browse files Browse the repository at this point in the history
… live

Fixes RT#127016: https://rt.perl.org/Public/Bug/Display.html?id=127016

This fix is a characterization test to make sure it doesn't break the previous behavior.
  • Loading branch information
titsuki committed Jan 5, 2018
1 parent e1aeb1d commit 287d650
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion S32-temporal/Date.t
Expand Up @@ -3,7 +3,7 @@ use Test;

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

plan 123;
plan 125;

# construction
{
Expand All @@ -12,6 +12,8 @@ plan 123;

# RT #127016
dies-ok { Date.new(Int, 1, 1) }, 'dies when its year is given as an Int type object';
lives-ok { Date.new(2010, 12/2, 3) }, 'Date.new(2010, 12/2, 3)';
lives-ok { Date.new('2018', '1', '4') }, "Date.new('2018', '1', '4')";

lives-ok { Date.new(:year(2010), :month(1), :day(1)) }, 'named arguments';
lives-ok { Date.today }, 'Date.today';
Expand Down

0 comments on commit 287d650

Please sign in to comment.