|
Lines 704-710
subtest "NewSubscription|ModSubscription" => sub {
Link Here
|
| 704 |
}; |
704 |
}; |
| 705 |
|
705 |
|
| 706 |
subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { |
706 |
subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { |
| 707 |
plan tests => 6; |
707 |
plan tests => 4; |
| 708 |
$subscription = { |
708 |
$subscription = { |
| 709 |
lastvalue1 => 1, lastvalue2 => 1, lastvalue3 => 1, |
709 |
lastvalue1 => 1, lastvalue2 => 1, lastvalue3 => 1, |
| 710 |
innerloop1 => 0, innerloop2 => 0, innerloop3 => 0, |
710 |
innerloop1 => 0, innerloop2 => 0, innerloop3 => 0, |
|
Lines 714-758
subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub {
Link Here
|
| 714 |
firstacquidate => '1970-11-01', |
714 |
firstacquidate => '1970-11-01', |
| 715 |
}; |
715 |
}; |
| 716 |
$pattern = { |
716 |
$pattern = { |
| 717 |
numberingmethod => '{Year} {Day} {DayName} {Month} {MonthName}', |
717 |
numberingmethod => '{Year} {Day} {Day2} {DayName} {Month} {Month2} {MonthName}', |
| 718 |
}; |
718 |
}; |
| 719 |
|
719 |
|
| 720 |
my $numbering = GetSeq( $subscription, $pattern ); |
720 |
my $numbering = GetSeq( $subscription, $pattern ); |
| 721 |
is( $numbering, '1970 1 Sunday 11 November', 'GetSeq correctly calculates numbering from first aqui date' ); |
721 |
is( $numbering, '1970 1 01 Sunday 11 11 November', 'GetSeq correctly calculates numbering from first aqui date' ); |
| 722 |
$subscription->{firstacquidate} = '2024-02-29'; |
722 |
$subscription->{firstacquidate} = '2024-02-29'; |
| 723 |
|
723 |
|
| 724 |
$numbering = GetSeq( $subscription, $pattern ); |
724 |
$numbering = GetSeq( $subscription, $pattern ); |
| 725 |
is( |
725 |
is( |
| 726 |
$numbering, '2024 29 Thursday 2 February', |
726 |
$numbering, '2024 29 29 Thursday 2 02 February', |
| 727 |
'GetSeq correctly calculates numbering from first aqui date, leap year' |
727 |
'GetSeq correctly calculates numbering from first aqui date, leap year' |
| 728 |
); |
728 |
); |
| 729 |
|
729 |
|
| 730 |
my $planneddate = '1970-11-01'; |
730 |
my $planneddate = '1970-11-01'; |
| 731 |
($numbering) = GetNextSeq( $subscription, $pattern, undef, $planneddate ); |
731 |
($numbering) = GetNextSeq( $subscription, $pattern, undef, $planneddate ); |
| 732 |
is( $numbering, '1970 1 Sunday 11 November', 'GetNextSeq correctly calculates numbering from planned date' ); |
732 |
is( $numbering, '1970 1 01 Sunday 11 11 November', 'GetNextSeq correctly calculates numbering from planned date' ); |
| 733 |
$planneddate = '2024-02-29'; |
733 |
$planneddate = '2024-02-29'; |
| 734 |
($numbering) = GetNextSeq( $subscription, $pattern, undef, $planneddate ); |
734 |
($numbering) = GetNextSeq( $subscription, $pattern, undef, $planneddate ); |
| 735 |
is( |
735 |
is( |
| 736 |
$numbering, '2024 29 Thursday 2 February', |
736 |
$numbering, '2024 29 29 Thursday 2 02 February', |
| 737 |
'GetNextSeq correctly calculates numbering from planned date, leap year' |
737 |
'GetNextSeq correctly calculates numbering from planned date, leap year' |
| 738 |
); |
738 |
); |
| 739 |
|
739 |
|
| 740 |
$pattern = { |
|
|
| 741 |
numberingmethod => '{Year} {Day} {DayName} {Month2} {MonthName}', |
| 742 |
}; |
| 743 |
$subscription->{firstacquidate} = '2024-02-29'; |
| 744 |
$planneddate = '2024-02-29'; |
| 745 |
$numbering = GetSeq( $subscription, $pattern ); |
| 746 |
is( |
| 747 |
$numbering, '2024 29 Thursday 02 February', |
| 748 |
'GetSeq correctly calculates 2 digit month numbering from first aqui date, leap year' |
| 749 |
); |
| 750 |
($numbering) = GetNextSeq( $subscription, $pattern, undef, $planneddate ); |
| 751 |
is( |
| 752 |
$numbering, '2024 29 Thursday 02 February', |
| 753 |
'GetNextSeq correctly calculates 2 digit month numbering from planned date, leap year' |
| 754 |
); |
| 755 |
|
| 756 |
}; |
740 |
}; |
| 757 |
|
741 |
|
| 758 |
subtest "DelSubscription" => sub { |
742 |
subtest "DelSubscription" => sub { |
| 759 |
- |
|
|