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/glob: Don't use $. as a non-matching regex #457

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

tavianator
Copy link
Contributor

@tavianator tavianator commented Sep 25, 2024

The oniguruma version built by onig_sys does not include the commit
6f7b0aa ("add ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP into
ONIG_SYNTAX_POSIX_BASIC and ONIG_SYNTAX_GREP"), causing $. to actually
match a literal newline.

Using $. is not portable anyway; POSIX says

A <dollar-sign> ( '$' ) shall be an anchor when used as the last
character of an entire BRE.

The oniguruma version built by onig_sys does not include the commit
6f7b0aa ("add ONIG_SYN_BRE_ANCHOR_AT_EDGE_OF_SUBEXP into
ONIG_SYNTAX_POSIX_BASIC and ONIG_SYNTAX_GREP"), causing `$.` to actually
match a literal newline.

Using `$.` is not portable anyway; POSIX says

> A <dollar-sign> ( '$' ) shall be an anchor when used as the last
> character of an entire BRE.
Copy link

Commit 4be8be2 has GNU testsuite comparison:

Run GNU findutils tests: GNU tests summary = TOTAL: 651 / PASS: 481 / FAIL: 167 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +0 / FAIL +0 / ERROR +0 / SKIP +0 
Run GNU findutils tests: Gnu tests No changes
Run BFS tests: Congrats! The bfs test posix/name_backslash is now passing!
Run BFS tests: Changes from main: PASS +1 / SKIP +0 / FAIL -1
Run BFS tests: BFS tests summary = TOTAL: 317 / PASS: 247 / SKIP: 6 / FAIL: 64

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.29%. Comparing base (b641b85) to head (e8fdd68).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #457   +/-   ##
=======================================
  Coverage   77.29%   77.29%           
=======================================
  Files          36       36           
  Lines        4436     4436           
  Branches      991      991           
=======================================
  Hits         3429     3429           
  Misses       1004     1004           
  Partials        3        3           

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

Copy link

Commit e8fdd68 has GNU testsuite comparison:

Run GNU findutils tests: GNU tests summary = TOTAL: 651 / PASS: 481 / FAIL: 167 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +0 / FAIL +0 / ERROR +0 / SKIP +0 
Run GNU findutils tests: Gnu tests No changes
Run BFS tests: Congrats! The bfs test posix/name_backslash is now passing!
Run BFS tests: Changes from main: PASS +1 / SKIP +0 / FAIL -1
Run BFS tests: BFS tests summary = TOTAL: 317 / PASS: 247 / SKIP: 6 / FAIL: 64

Copy link
Collaborator

@hanbings hanbings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@hanbings hanbings merged commit acbfcc5 into uutils:main Sep 27, 2024
19 checks passed
@tavianator tavianator deleted the fix-name-backslash branch September 27, 2024 15:55
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.

2 participants