Skip to content

find: -printf: test octal escape before a multibyte char#727

Merged
sylvestre merged 1 commit into
uutils:mainfrom
leeewee:find-printf-octal-test
Jun 10, 2026
Merged

find: -printf: test octal escape before a multibyte char#727
sylvestre merged 1 commit into
uutils:mainfrom
leeewee:find-printf-octal-test

Conversation

@leeewee

@leeewee leeewee commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #723 (fixes #720): adds the integration test requested in review.

-printf octal escapes (\NNN) followed by a multibyte character used to slice the format string mid-char and panic. #723 fixed the parser; this adds a tests/test_find.rs regression test asserting find … -printf '\0€\n' succeeds and emits the escape byte plus the following character intact (00 e2 82ac 0a).

Regression test for the panic fixed in uutils#720/uutils#723: a `\NNN` octal escape
immediately followed by a multibyte character (`\0€`) used to slice the
format string mid-char and abort. Assert `-printf` emits the escape byte
and the following character intact.
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.86%. Comparing base (001966f) to head (b402ac5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #727   +/-   ##
=======================================
  Coverage   91.86%   91.86%           
=======================================
  Files          35       35           
  Lines        7155     7155           
  Branches      375      375           
=======================================
  Hits         6573     6573           
  Misses        437      437           
  Partials      145      145           

☔ View full report in Codecov by Harness.
📢 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.

@codspeed-hq

codspeed-hq Bot commented Jun 10, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing leeewee:find-printf-octal-test (b402ac5) with main (001966f)

Open in CodSpeed

@sylvestre sylvestre merged commit 5992901 into uutils:main Jun 10, 2026
23 checks passed
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.

find panics (str char-boundary) on a multibyte char after an octal escape in -printf

2 participants