Skip to content

Integration tests for date parsing #161

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

Merged
merged 2 commits into from
Jun 24, 2025

Conversation

Maximkaaa
Copy link
Contributor

There are a lot of open issues both here and in the coreutils repo related to invalid parsing of dates. Some of them are already fixed, but not closed, some are still pending, some have open PRs, some are related and report the same thing. And some issues are not discovered yet.

So I thought it would be nice to have an easy to navigate list of things that work and do not work, and an easy way to check and update it. So I came up with this.

The tests in this PR basically cover everything (and a little more) covered by https://www.gnu.org/software/coreutils/manual/html_node/Calendar-date-items.html (not entirely true, they cover only what should work, but do not test things that shouldn't work).

Before I go on to other chapters of that manual, I would like to know what the maintainers think about it:

  • how do you feel about the format of the tests?
  • how do you feel about adding dev dependency to rstest?
  • do you think it's better to create one huge PR with all integration tests at once, or add them bit my bit in separate PRs (for example, by chapter in the manual)?

@Maximkaaa Maximkaaa force-pushed the integration_tests branch from 5afbad4 to 7260b0a Compare June 20, 2025 09:16
@Maximkaaa
Copy link
Contributor Author

@sylvestre @cakebaker A polite ping. If this is not something that is needed for parse_datetime, let's close this PR.

@sylvestre sylvestre merged commit 3be37c4 into uutils:main Jun 24, 2025
17 checks passed
Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (30cb26d) to head (7260b0a).
Report is 5 commits behind head on main.

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

☔ 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.

@Maximkaaa Maximkaaa deleted the integration_tests branch June 24, 2025 10:37
@sylvestre
Copy link
Contributor

Thanks

@cakebaker
Copy link
Collaborator

cakebaker commented Jun 24, 2025

Hm, at least on my machine all new tests fail with:

thread 'test_absolute_date_numeric::case_01_iso8601' panicked at tests/common/mod.rs:10:5:
assertion `left == right` failed: Input value: 2022-11-14
  left: "2022-11-14 00:00:00+02:00"
 right: "2022-11-14 00:00:00+00:00"

It looks like it's because I'm currently in UTC+2 and the tests expect UTC.

Edit: I fixed it in #162

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.

3 participants