mnemosyne/t/schedule.t

37 lines
1.2 KiB
Perl

#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
# Schedule.pm unit tests — date math across all five task classes.
# This file is a placeholder; tests will be added as Schedule.pm is implemented.
#
# Priority test cases to cover:
#
# monthly_date:
# - Normal case: day_of_month=15, today=2026-06-15 → due
# - Short-month clamp: day_of_month=31, today=2026-06-30 → due (last day of June)
# - Short-month clamp: day_of_month=31, today=2026-06-15 → upcoming
# - Overdue: day_of_month=1, today=2026-06-05, no completion → overdue
#
# monthly_weekday:
# - 4th Monday: 2026-06 → 2026-06-22
# - last Monday: 2026-06 → 2026-06-29
# - ordinal=1, weekday=0 (Mon): 2026-06 → 2026-06-01
#
# every_n_period:
# - every 2 weeks from 2026-01-01: check correct occurrence dates
# - every 3 months from 2026-01-15: Feb has 28 days — verify month arithmetic
#
# interval:
# - never completed: due = created_at + interval_days
# - completed yesterday: interval=30 → not due yet
# - completed 31 days ago: interval=30 → overdue
#
# floating:
# - high priority → always shown
# - medium: shown at day 0 and day 3, not at day 1 or 2
plan skip_all => 'Schedule.pm not yet implemented';
done_testing;