Skip to content

find/glob: Don't use $. as a non-matching regex - #457

Merged
hanbings merged 1 commit into
uutils:mainfrom
tavianator:fix-name-backslash
Sep 27, 2024
Merged

hanbings merged 1 commit into
uutils:mainfrom
tavianator:fix-name-backslash

Conversation

@tavianator

@tavianator tavianator commented Sep 25, 2024 •

Copy link
Copy Markdown
Contributor

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.
@github-actions

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Sep 25, 2024 •

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

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

@hanbings hanbings left a comment

Copy link
Copy Markdown
Collaborator

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
@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