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

find: Fix unexpectedly accepted empty expression. #353

Merged
merged 2 commits into from
Apr 18, 2024
Merged

find: Fix unexpectedly accepted empty expression. #353

merged 2 commits into from
Apr 18, 2024

Conversation

hanbings
Copy link
Collaborator

fix: #29

This commit modifies a test function build_top_level_matcher_too_many_brackets outside of my code,
which tests that find -true \( \) \) will return a too many ')' error.

But in GNU find, this instruction will first cause an empty parentheses are not allowed error,
so it is changed to find . -type f \( -name "*.txt" \) \) to maintain compatibility.

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

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

Project coverage is 59.41%. Comparing base (d8e2ce2) to head (0febdac).

Files Patch % Lines
src/find/matchers/mod.rs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
+ Coverage   59.34%   59.41%   +0.06%     
==========================================
  Files          30       30              
  Lines        3822     3831       +9     
  Branches      867      871       +4     
==========================================
+ Hits         2268     2276       +8     
  Misses       1218     1218              
- Partials      336      337       +1     

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

@sylvestre
Copy link
Contributor

could you please add a test here: https://github.com/uutils/findutils/blob/main/tests/find_cmd_tests.rs
thanks

@hanbings
Copy link
Collaborator Author

could you please add a test here: https://github.com/uutils/findutils/blob/main/tests/find_cmd_tests.rs thanks

OK, it's included in the latest commit.

@cakebaker cakebaker merged commit 6a83795 into uutils:main Apr 18, 2024
18 checks passed
@cakebaker
Copy link
Contributor

Thanks!

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.

Empty brackets accepted
3 participants