Skip to content

find: Fix -newerXY test code for Windows platform.#394

Merged
sylvestre merged 1 commit into
uutils:mainfrom
hanbings:fix-windows-test
May 30, 2024
Merged

find: Fix -newerXY test code for Windows platform.#394
sylvestre merged 1 commit into
uutils:mainfrom
hanbings:fix-windows-test

Conversation

@hanbings

Copy link
Copy Markdown
Collaborator
  1. Using fs::remove_file in Windows platform tests may return an Ok() even if the file is not deleted immediately, which will cause an error in the code in the test that assumes the file is deleted.
  2. In another test code, some / separators were accidentally escaped as \\. Now it has been changed to use contains to determine whether the output contains a specific path and ignore the path separator problem.

@codecov

codecov Bot commented May 29, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 58.88%. Comparing base (3badb05) to head (bd759d5).

Files Patch % Lines
src/find/matchers/time.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #394      +/-   ##
==========================================
+ Coverage   58.80%   58.88%   +0.07%     
==========================================
  Files          30       30              
  Lines        3855     3855              
  Branches      851      849       -2     
==========================================
+ Hits         2267     2270       +3     
  Misses       1254     1254              
+ Partials      334      331       -3     

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

@sylvestre

Copy link
Copy Markdown
Contributor

please add tests to make sure we don't regress, thanks

@cakebaker

Copy link
Copy Markdown
Contributor

@sylvestre: hm, what tests are you looking for? As far as I see it, this PR is about fixing the broken tests on Windows, so the tests are already there.

@sylvestre

Copy link
Copy Markdown
Contributor

oups, sorry

@sylvestre sylvestre merged commit add14db into uutils:main May 30, 2024
@hanbings hanbings deleted the fix-windows-test branch June 7, 2024 18:20
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