Skip to content

fix: list non-ascii as octal bytes#436

Open
MukundaKatta wants to merge 2 commits into
uutils:mainfrom
MukundaKatta:codex/list-nonascii-octal
Open

fix: list non-ascii as octal bytes#436
MukundaKatta wants to merge 2 commits into
uutils:mainfrom
MukundaKatta:codex/list-nonascii-octal

Conversation

@MukundaKatta
Copy link
Copy Markdown
Contributor

Summary

  • update the l command to emit non-ASCII UTF-8 bytes as three-digit octal escapes
  • keep existing named escapes and printable ASCII output unchanged
  • update the Unicode listing fixture and add a regression for the reported cÃ🧰y case

Fixes #249.

Tests

  • printf 'cÃ🧰y\n' | cargo run --quiet -- -e 'l'
  • cargo test list_unicode
  • cargo test list_non_ascii_uses_octal_bytes
  • cargo fmt --check
  • git diff --check
  • cargo test test_sed
  • cargo test

@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.16%. Comparing base (f083fa0) to head (7a24f4f).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/sed/processor.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #436      +/-   ##
==========================================
- Coverage   82.20%   82.16%   -0.05%     
==========================================
  Files          13       13              
  Lines        5542     5545       +3     
  Branches      310      309       -1     
==========================================
  Hits         4556     4556              
- Misses        983      986       +3     
  Partials        3        3              
Flag Coverage Δ
macos_latest 82.85% <0.00%> (-0.05%) ⬇️
ubuntu_latest 82.95% <0.00%> (-0.05%) ⬇️
windows_latest 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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
Copy link
Copy Markdown

codspeed-hq Bot commented May 16, 2026

Merging this PR will not alter performance

✅ 11 untouched benchmarks


Comparing MukundaKatta:codex/list-nonascii-octal (7a24f4f) with main (a65af95)

Open in CodSpeed

Building the octal-escape string via .map(format!).collect() trips
clippy::format_collect under -D warnings. Use a write!-based loop
instead.
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.

l command uses different escape format than GNU

1 participant