Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ls: adjust the error message check for tests/ls/classify.sh #5437

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/uu/ls/src/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,7 @@ pub fn uu_app() -> Command {
.long(options::INDICATOR_STYLE)
.help(
"Append indicator with style WORD to entry names: \
none (default), slash (-p), file-type (--file-type), classify (-F)",
none (default), slash (-p), file-type (--file-type), classify (-F)",
)
.value_parser(["none", "slash", "file-type", "classify"])
.overrides_with_all([
Expand Down
3 changes: 3 additions & 0 deletions util/build-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ sed -i -E "s|^([^#]*2_31.*)$|#\1|g" tests/printf/printf-cov.pl

sed -i -e "s/du: invalid -t argument/du: invalid --threshold argument/" -e "s/du: option requires an argument/error: a value is required for '--threshold <SIZE>' but none was supplied/" -e "/Try 'du --help' for more information./d" tests/du/threshold.sh

# clap returns 2 when rejecting a value
sed -i -e "s|returns_ 1 ls |returns_ 2 ls |g" tests/ls/classify.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'm not sure about this change. I think we solve this differently in other tools and return 1 there. For example, cargo run nl --number-format=invalid returns a status code of 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure
Do you know how to do it ? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #5446


# with ls --dired, in case of error, we have a slightly different error position
sed -i -e "s|44 45|48 49|" tests/ls/stat-failed.sh

Expand Down