Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests of adding months more resilient #112

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

jfinkels
Copy link
Contributor

@jfinkels jfinkels commented Feb 8, 2025

Protect against a situation where adding one month to the current day would cause an overflow in the next month in some unit tests of parse_relative_time. For example, adding one month to March 31 should overflow to May 1 because April only has 30 days. This is a difference in the behavior we want for our library compared with the behavior of chrono.

This change was extracted from pull request #110.

Protect against a situation where adding one month to the current day
would cause an overflow in the next month in some unit tests of
`parse_relative_time`. For example, adding one month to March 31
should overflow to May 1 because April only has 30 days. This is a
difference in the behavior we want for our library compared with the
behavior of `chrono`.
@sylvestre sylvestre merged commit 7985aa0 into uutils:main Feb 8, 2025
14 checks passed
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (0318dab) to head (8dd8051).
Report is 3 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #112   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants