Skip to content

Comments

date: add tests#259

Merged
sylvestre merged 4 commits intouutils:mainfrom
sylvestre:fix-leap-1
Feb 14, 2026
Merged

date: add tests#259
sylvestre merged 4 commits intouutils:mainfrom
sylvestre:fix-leap-1

Conversation

@sylvestre
Copy link
Contributor

When adding years to Feb 29, if the target year is not a leap year, overflow to March 1 (GNU behavior). Previously clamped to Feb 28.

@sylvestre sylvestre force-pushed the fix-leap-1 branch 3 times, most recently from 023a112 to 8a09e66 Compare February 14, 2026 10:30
@sylvestre sylvestre changed the title date: fix leap-1 test - leap year overflow date: add tests Feb 14, 2026
@sylvestre sylvestre force-pushed the fix-leap-1 branch 2 times, most recently from 0d03461 to 2a25d41 Compare February 14, 2026 16:53
@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.72%. Comparing base (9688db0) to head (bdbb439).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #259      +/-   ##
==========================================
+ Coverage   97.79%   98.72%   +0.93%     
==========================================
  Files          18       18              
  Lines        2445     2587     +142     
  Branches       68       69       +1     
==========================================
+ Hits         2391     2554     +163     
+ Misses         53       32      -21     
  Partials        1        1              
Flag Coverage Δ
macos_latest 98.72% <100.00%> (+0.93%) ⬆️
ubuntu_latest 98.72% <100.00%> (+0.93%) ⬆️
windows_latest 20.52% <0.00%> (-1.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

NOTE: This commit only adds tests as the implementation was already
working correctly. These tests document and verify the expected
behavior for the embedded timezone edge case referenced in Debian
bug #851934.
Add tests to verify that adding 0 years or 0 months returns the
original date unchanged, including edge cases with Feb 29.
@sylvestre sylvestre merged commit 73b4b0a into uutils:main Feb 14, 2026
19 checks passed
@sylvestre sylvestre deleted the fix-leap-1 branch February 14, 2026 17:22
@sylvestre
Copy link
Contributor Author

codecov/project 98.72% (+0.93%) compared to 9688db0

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.

1 participant