Skip to content

fix: rename "Unknown option" to "unrecognized option" for diff and cmp#179

Merged
sylvestre merged 2 commits intouutils:mainfrom
Ryujiyasu:fix/unrecognized-option-message
Feb 28, 2026
Merged

fix: rename "Unknown option" to "unrecognized option" for diff and cmp#179
sylvestre merged 2 commits intouutils:mainfrom
Ryujiyasu:fix/unrecognized-option-message

Conversation

@Ryujiyasu
Copy link
Contributor

Summary

  • Rename error message from Unknown option to unrecognized option in both diff and cmp commands
  • Update the integration test expectation to match

Fixes #178

Test plan

  • cargo test — all 125 unit tests and 21 integration tests pass
  • Verified diffutils diff --foobar outputs unrecognized option: "--foobar"
  • Verified diffutils cmp --foobar outputs unrecognized option: "--foobar"

🤖 Generated with Claude Code

Ryujiyasu and others added 2 commits February 28, 2026 21:11
Fixes uutils#178

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sylvestre sylvestre merged commit 6f082c6 into uutils:main Feb 28, 2026
26 checks passed
@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (34db0ad) to head (8597843).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #179   +/-   ##
===========================
===========================

☔ 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.

Ryujiyasu added a commit to Ryujiyasu/diffutils that referenced this pull request Feb 28, 2026
Use single quotes and remove colon to match GNU diff/cmp output:
`unrecognized option '--foobar'` instead of `unrecognized option: "--foobar"`

Also use `contains` instead of `starts_with` in the integration test
to handle the command prefix (e.g. `cmp: unrecognized option ...`).

Follow-up to uutils#178 / uutils#179.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

diff cmp: Unknown option -> Unrecognized option

2 participants