Menu

The error messages a Rust rewrite got subtly wrong: what a black-box probe found in uutils coreutils
📰

The error messages a Rust rewrite got subtly wrong: what a black-box probe found in uutils coreutils

DEV Community: rust·Emir Mrkaljević·about 15 hours ago
#NU6IJWMK
#devtorust#devto#dev#behave#file
Reading 0:00
15s threshold

When you rewrite a command-line tool, the happy path is the easy part. Output for valid input gets compared early and often. Error messages are where rewrites quietly drift: a different wording, a missing file name, a raw (os error 20) instead of the sentence a script or a person expects.

I have been running behave against uutils coreutils , the Rust rewrite of GNU coreutils. behave probes a CLI as a black box (flags from --help , stdin, files, odd inputs), records what the reference tool does, and replays the same cases against the rewrite. I record from GNU 9.12, the release uutils targets.

One probe case added in v0.1.7 is simply "a regular file passed with a trailing slash" ( f/ ).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.